Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé
Classe « JSON »

Constructeur sqlalchemy.JSON.__init__

Signature de la constructeur __init__

def __init__(self, none_as_null: 'bool' = False) 

Description

help(JSON.__init__)

Construct a :class:`_types.JSON` type.

:param none_as_null=False: if True, persist the value ``None`` as a
 SQL NULL value, not the JSON encoding of ``null``. Note that when this
 flag is False, the :func:`.null` construct can still be used to
 persist a NULL value, which may be passed directly as a parameter
 value that is specially interpreted by the :class:`_types.JSON` type
 as SQL NULL::

     from sqlalchemy import null

     conn.execute(table.insert(), {"data": null()})

 .. note::

      :paramref:`_types.JSON.none_as_null` does **not** apply to the
      values passed to :paramref:`_schema.Column.default` and
      :paramref:`_schema.Column.server_default`; a value of ``None``
      passed for these parameters means "no default present".

      Additionally, when used in SQL comparison expressions, the
      Python value ``None`` continues to refer to SQL null, and not
      JSON NULL.  The :paramref:`_types.JSON.none_as_null` flag refers
      explicitly to the **persistence** of the value within an
      INSERT or UPDATE statement.   The :attr:`_types.JSON.NULL`
      value should be used for SQL expressions that wish to compare to
      JSON null.

 .. seealso::

      :attr:`.types.JSON.NULL`



Vous êtes un professionnel et vous avez besoin d'une formation ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé