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

Méthode sqlalchemy.Engine.connect

Signature de la méthode connect

def connect(self) -> 'Connection' 

Description

help(Engine.connect)

Return a new :class:`_engine.Connection` object.

The :class:`_engine.Connection` acts as a Python context manager, so
the typical use of this method looks like::

    with engine.connect() as connection:
        connection.execute(text("insert into table values ('foo')"))
        connection.commit()

Where above, after the block is completed, the connection is "closed"
and its underlying DBAPI resources are returned to the connection pool.
This also has the effect of rolling back any transaction that
was explicitly begun or was begun via autobegin, and will
emit the :meth:`_events.ConnectionEvents.rollback` event if one was
started and is still in progress.

.. seealso::

    :meth:`_engine.Engine.begin`



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