[Sqlalchemy-commits] commit/sqlalchemy: 2 new changesets
Brought to you by:
zzzeek
From: Bitbucket <com...@bi...> - 2017-05-18 21:47:13
|
2 new commits in sqlalchemy: https://bitbucket.org/zzzeek/sqlalchemy/commits/4d4ea792e7ea/ Changeset: 4d4ea792e7ea Branch: master User: zzzeek Date: 2017-05-18 21:44:10+00:00 Summary: - Document the most transparent way to set JSON.NULL for a column default. The JSON.NULL value is special in that while it is a Python-side value, it represents "do this special behavior", and is not at all like any other Python-side value for which normally, that's exactly the type of data we want back. So in this case, encourage the user to use a SQL expression that is exact, so in the ORM context, you get back what was actually persisted in the column. There's some variants of this such as literal(JSON.NULL, JSON) but text("'null'") is simpler. Change-Id: I0339fafdc03e4b2f533d53970b2f74c774f2687b Fixes: #3923 Affected #: 1 file https://bitbucket.org/zzzeek/sqlalchemy/commits/32300ea9faf7/ Changeset: 32300ea9faf7 Branch: rel_1_1 User: zzzeek Date: 2017-05-18 21:46:18+00:00 Summary: - Document the most transparent way to set JSON.NULL for a column default. The JSON.NULL value is special in that while it is a Python-side value, it represents "do this special behavior", and is not at all like any other Python-side value for which normally, that's exactly the type of data we want back. So in this case, encourage the user to use a SQL expression that is exact, so in the ORM context, you get back what was actually persisted in the column. There's some variants of this such as literal(JSON.NULL, JSON) but text("'null'") is simpler. Change-Id: I0339fafdc03e4b2f533d53970b2f74c774f2687b Fixes: #3923 (cherry picked from commit 4d4ea792e7ea7945de9c9b1e005ce09b2feb45b5) Affected #: 1 file Repository URL: https://bitbucket.org/zzzeek/sqlalchemy/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |