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 ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé
Classe « scoped_session »

Méthode sqlalchemy.orm.scoped_session.delete

Signature de la méthode delete

def delete(self, instance: 'object') -> 'None' 

Description

help(scoped_session.delete)

Mark an instance as deleted.

.. container:: class_bases

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

The object is assumed to be either :term:`persistent` or
:term:`detached` when passed; after the method is called, the
object will remain in the :term:`persistent` state until the next
flush proceeds.  During this time, the object will also be a member
of the :attr:`_orm.Session.deleted` collection.

When the next flush proceeds, the object will move to the
:term:`deleted` state, indicating a ``DELETE`` statement was emitted
for its row within the current transaction.   When the transaction
is successfully committed,
the deleted object is moved to the :term:`detached` state and is
no longer present within this :class:`_orm.Session`.

.. seealso::

    :ref:`session_deleting` - at :ref:`session_basics`




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