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
SQLAlchemy allows for a whole host of different defaults, but briefly summarized, these are broadly what are accepted:
Constant values. Strings, booleans, containers, or any value object
SQL expressions. That are executed during flush (e.g. sqlalchemy.func.now())
Python callables. These can be of two kinds: simple argument-less functions, or ones that are context sensitive, meaning they accept an execution context, which allows access to other columns’ values and various other bits.
Introduction
Setting eager defaults for SQLAlchemy ORM models has a sweet summary about different ways to set default values for columns within SQLAlchemy schema definitions.
The complete reference documentation is available at SQLAlchemy: Column INSERT/UPDATE defaults.
References
server_default
column definition option #106Thoughts
We may want to check if all variants are supported by the CrateDB SQLAlchemy dialect implementation, and if all variants are documented properly.
/cc @hammerhead
The text was updated successfully, but these errors were encountered: