I'm creating a schema for my DB using PostgreSQL and SQLAlchemy in declarative base and ran into a question that I think is answered but I'm somehow getting the syntax wrong.
I'm thinking of having an entry that's a multidimensional array (I only need 2D, but I figured I'd ask for an n-dimentional array solution in case I run into other issues). I essentially need to have some_field[string][string]
but am not sure of how to do that.
class SomeTable(Base):
__tablename__ = 'some_table'
multi_d_array = Column(postgresql.ARRAY(String)) #How do I make 2D+?
With an earlier version dimensionality was apparently unenforced (link: PostgreSQL multidimensional arrays in SQLAlchemy), but apparently this was patched (link: https://groups.google.com/forum/?fromgroups=#!topic/sqlalchemy/w4-nbMdxxUg). The documentation still says it's unenforced (link: http://docs.sqlalchemy.org/en/latest/dialects/postgresql.html) but I just wanted to make sure the code works alright before having my DB blow up.
Thanks for helping me with my newbie question.