2 ms·
Yes, because you're creating a table and the value needs to be encoded as string in the CRATE TABLE query. You could in theory pass a lambda which is disassembl
by viraptor 2y ago
Yes, because you're creating a table and the value needs to be encoded as string in the CRATE TABLE query. You could in theory pass a lambda which is disassembled in SQLalchemy, then checked against the pattern returning a constant, then the constant itself gets used... But I'm not sure SQLalchemy would go that way. It's not as crazy as Linq.
To be explicit: You're not seeing a function called later in python. You're setting an attribute on a database table.
- Nullabillity 2y agoNo[0], default= is inserted into the DML queries by the client. A DDL DEFAULT clause is only generated if you set server_default= instead. [0]: https://docs.sqlalchemy.org/en/20/core/defaults.html https://docs.sqlalchemy.org/en/20/core/defaults.html