You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sqlacodegen outputs a enum_column: Mapped[Optional[str]] = mapped_column(Enum()) for a postgresql table with an enum type - What's your approach to interacting with that column in Python?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When
sqlacodegen
outputs aenum_column: Mapped[Optional[str]] = mapped_column(Enum())
for a postgresql table with an enum type - What's your approach to interacting with that column in Python?It would be easier of the
Enum
itself was created in the output as something we could import instead of it only being created as an argument to mapped column. Similar to the example - https://docs.sqlalchemy.org/en/20/orm/declarative_tables.html#using-python-enum-or-pep-586-literal-types-in-the-type-mapBeta Was this translation helpful? Give feedback.
All reactions