summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/sqltypes.py7
-rw-r--r--lib/sqlalchemy/sql/type_api.py7
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py
index 118c26070..cae23902b 100644
--- a/lib/sqlalchemy/sql/sqltypes.py
+++ b/lib/sqlalchemy/sql/sqltypes.py
@@ -1796,6 +1796,13 @@ class JSON(Indexable, TypeEngine):
from sqlalchemy import null
conn.execute(table.insert(), data=null())
+ .. note::
+
+ :paramref:`.JSON.none_as_null` does **not** apply to the
+ values passed to :paramref:`.Column.default` and
+ :paramref:`.Column.server_default`; a value of ``None`` passed for
+ these parameters means "no default present".
+
.. seealso::
:attr:`.types.JSON.NULL`
diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py
index 217f7016b..689b4c79b 100644
--- a/lib/sqlalchemy/sql/type_api.py
+++ b/lib/sqlalchemy/sql/type_api.py
@@ -182,6 +182,13 @@ class TypeEngine(Visitable):
the :obj:`~.expression.null` SQL construct in an INSERT statement
or associated with an ORM-mapped attribute.
+ .. note::
+
+ The "evaulates none" flag does **not** apply to a value
+ of ``None`` passed to :paramref:`.Column.default` or
+ :paramref:`.Column.server_default`; in these cases, ``None``
+ still means "no default".
+
.. versionadded:: 1.1
.. seealso::