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 « scoped_session »

Méthode sqlalchemy.orm.scoped_session.get_one

Signature de la méthode get_one

def get_one(self, entity: '_EntityBindKey[_O]', ident: '_PKIdentityArgument', *, options: 'Optional[Sequence[ORMOption]]' = None, populate_existing: 'bool' = False, with_for_update: 'ForUpdateParameter' = None, identity_token: 'Optional[Any]' = None, execution_options: 'OrmExecuteOptionsParameter' = immutabledict({}), bind_arguments: 'Optional[_BindArguments]' = None) -> '_O' 

Description

help(scoped_session.get_one)

Return exactly one instance based on the given primary key
identifier, or raise an exception if not found.

.. container:: class_bases

    Proxied for the :class:`_orm.Session` class on
    behalf of the :class:`_orm.scoping.scoped_session` class.

Raises ``sqlalchemy.orm.exc.NoResultFound`` if the query
selects no rows.

For a detailed documentation of the arguments see the
method :meth:`.Session.get`.

.. versionadded:: 2.0.22

:return: The object instance.

.. seealso::

    :meth:`.Session.get` - equivalent method that instead
      returns ``None`` if no row was found with the provided primary
      key




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é