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 ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Module « sqlalchemy.orm »

Fonction orm_insert_sentinel - module sqlalchemy.orm

Signature de la fonction orm_insert_sentinel

def orm_insert_sentinel(name: 'Optional[str]' = None, type_: 'Optional[_TypeEngineArgument[Any]]' = None, *, default: 'Optional[Any]' = None, omit_from_statements: 'bool' = True) -> 'MappedColumn[Any]' 

Description

help(sqlalchemy.orm.orm_insert_sentinel)

Provides a surrogate :func:`_orm.mapped_column` that generates
a so-called :term:`sentinel` column, allowing efficient bulk
inserts with deterministic RETURNING sorting for tables that don't
otherwise have qualifying primary key configurations.

Use of :func:`_orm.orm_insert_sentinel` is analogous to the use of the
:func:`_schema.insert_sentinel` construct within a Core
:class:`_schema.Table` construct.

Guidelines for adding this construct to a Declarative mapped class
are the same as that of the :func:`_schema.insert_sentinel` construct;
the database table itself also needs to have a column with this name
present.

For background on how this object is used, see the section
:ref:`engine_insertmanyvalues_sentinel_columns` as part of the
section :ref:`engine_insertmanyvalues`.

.. seealso::

    :func:`_schema.insert_sentinel`

    :ref:`engine_insertmanyvalues`

    :ref:`engine_insertmanyvalues_sentinel_columns`


.. versionadded:: 2.0.10



Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé