Answers for "how to use array flask sqlalchemy"

CSS
0

flask sqlalchemy array column

from sqlalchemy.dialects.postgresql import ARRAY

class MyTable:
    __tablename__ = 'mytable'

    id = Column(Integer, primary_key=True)
    text_array = Column(ARRAY(Unicode))

    def __init__(self, text_array):
        self.text_array = text_array
Posted by: Guest on May-14-2021

Browse Popular Code Answers by Language