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 ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé
Classe « scoped_session »

Méthode sqlalchemy.orm.scoped_session.bulk_update_mappings

Signature de la méthode bulk_update_mappings

def bulk_update_mappings(self, mapper: 'Mapper[Any]', mappings: 'Iterable[Dict[str, Any]]') -> 'None' 

Description

help(scoped_session.bulk_update_mappings)

Perform a bulk update of the given list of mapping dictionaries.

.. container:: class_bases

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

.. legacy::

    This method is a legacy feature as of the 2.0 series of
    SQLAlchemy.   For modern bulk INSERT and UPDATE, see
    the sections :ref:`orm_queryguide_bulk_insert` and
    :ref:`orm_queryguide_bulk_update`.  The 2.0 API shares
    implementation details with this method and adds new features
    as well.

:param mapper: a mapped class, or the actual :class:`_orm.Mapper`
 object,
 representing the single kind of object represented within the mapping
 list.

:param mappings: a sequence of dictionaries, each one containing the
 state of the mapped row to be updated, in terms of the attribute names
 on the mapped class.   If the mapping refers to multiple tables, such
 as a joined-inheritance mapping, each dictionary may contain keys
 corresponding to all tables.   All those keys which are present and
 are not part of the primary key are applied to the SET clause of the
 UPDATE statement; the primary key values, which are required, are
 applied to the WHERE clause.


.. seealso::

    :doc:`queryguide/dml`

    :meth:`.Session.bulk_insert_mappings`

    :meth:`.Session.bulk_save_objects`




Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé