summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/assertsql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-05-18 17:44:10 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2017-05-18 17:44:10 -0400
commit4d4ea792e7ea7945de9c9b1e005ce09b2feb45b5 (patch)
tree72ad47ac17cb231f321c79e033d86a2ad693e486 /lib/sqlalchemy/testing/assertsql.py
parent912fb6c2d54d7f2fcda654a8f7702d122e8b8d70 (diff)
downloadsqlalchemy-4d4ea792e7ea7945de9c9b1e005ce09b2feb45b5.tar.gz
- 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
Diffstat (limited to 'lib/sqlalchemy/testing/assertsql.py')
0 files changed, 0 insertions, 0 deletions