Problem with typing arrays. #382
-
Hello everyone, Just found this wonderful library, however I'm facing an issue that I couldn't find an answer for in the docs. I have a table that uses postgresql ARRAYs, sqlacodegen is perfectly capable of creating the right side of the model, but the types are wrong (partially unknown to be precise). Anyone know a solution for this? I decided to open a discussion first instead of an issue since others might have already faces this. CREATE TABLE FOO (
id SERIAL PRIMARY KEY,
some_ints INT[],
some_floats FLOAT[]
); class Foo(Base)
#...etc
# right side is perfect! The type however is partially known
some_ints: Mapped[Optional[list]] = mapped_column(ARRAY(Integer())) Saw that this codebase is looking for maintainers, so if PRs are welcome I could take a crack at it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@JoaquimEsteves |
Beta Was this translation helpful? Give feedback.
-
@JoaquimEsteves I'm closing this discusson. I've opened #383 PRs are more than welcomed |
Beta Was this translation helpful? Give feedback.
@JoaquimEsteves I'm closing this discusson. I've opened #383
PRs are more than welcomed