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é
Classe « ORMExecuteState »

Méthode sqlalchemy.orm.ORMExecuteState.invoke_statement

Signature de la méthode invoke_statement

def invoke_statement(self, statement: 'Optional[Executable]' = None, params: 'Optional[_CoreAnyExecuteParams]' = None, execution_options: 'Optional[OrmExecuteOptionsParameter]' = None, bind_arguments: 'Optional[_BindArguments]' = None) -> 'Result[Any]' 

Description

help(ORMExecuteState.invoke_statement)

Execute the statement represented by this
:class:`.ORMExecuteState`, without re-invoking events that have
already proceeded.

This method essentially performs a re-entrant execution of the current
statement for which the :meth:`.SessionEvents.do_orm_execute` event is
being currently invoked.    The use case for this is for event handlers
that want to override how the ultimate
:class:`_engine.Result` object is returned, such as for schemes that
retrieve results from an offline cache or which concatenate results
from multiple executions.

When the :class:`_engine.Result` object is returned by the actual
handler function within :meth:`_orm.SessionEvents.do_orm_execute` and
is propagated to the calling
:meth:`_orm.Session.execute` method, the remainder of the
:meth:`_orm.Session.execute` method is preempted and the
:class:`_engine.Result` object is returned to the caller of
:meth:`_orm.Session.execute` immediately.

:param statement: optional statement to be invoked, in place of the
 statement currently represented by :attr:`.ORMExecuteState.statement`.

:param params: optional dictionary of parameters or list of parameters
 which will be merged into the existing
 :attr:`.ORMExecuteState.parameters` of this :class:`.ORMExecuteState`.

 .. versionchanged:: 2.0 a list of parameter dictionaries is accepted
    for executemany executions.

:param execution_options: optional dictionary of execution options
 will be merged into the existing
 :attr:`.ORMExecuteState.execution_options` of this
 :class:`.ORMExecuteState`.

:param bind_arguments: optional dictionary of bind_arguments
 which will be merged amongst the current
 :attr:`.ORMExecuteState.bind_arguments`
 of this :class:`.ORMExecuteState`.

:return: a :class:`_engine.Result` object with ORM-level results.

.. seealso::

    :ref:`do_orm_execute_re_executing` - background and examples on the
    appropriate usage of :meth:`_orm.ORMExecuteState.invoke_statement`.




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