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

Méthode sqlalchemy.Connection.exec_driver_sql

Signature de la méthode exec_driver_sql

def exec_driver_sql(self, statement: 'str', parameters: 'Optional[_DBAPIAnyExecuteParams]' = None, execution_options: 'Optional[CoreExecuteOptionsParameter]' = None) -> 'CursorResult[Any]' 

Description

help(Connection.exec_driver_sql)

Executes a string SQL statement on the DBAPI cursor directly,
without any SQL compilation steps.

This can be used to pass any string directly to the
``cursor.execute()`` method of the DBAPI in use.

:param statement: The statement str to be executed.   Bound parameters
 must use the underlying DBAPI's paramstyle, such as "qmark",
 "pyformat", "format", etc.

:param parameters: represent bound parameter values to be used in the
 execution.  The format is one of:   a dictionary of named parameters,
 a tuple of positional parameters, or a list containing either
 dictionaries or tuples for multiple-execute support.

:return: a :class:`_engine.CursorResult`.

 E.g. multiple dictionaries::


     conn.exec_driver_sql(
         "INSERT INTO table (id, value) VALUES (%(id)s, %(value)s)",
         [{"id": 1, "value": "v1"}, {"id": 2, "value": "v2"}],
     )

 Single dictionary::

     conn.exec_driver_sql(
         "INSERT INTO table (id, value) VALUES (%(id)s, %(value)s)",
         dict(id=1, value="v1"),
     )

 Single tuple::

     conn.exec_driver_sql(
         "INSERT INTO table (id, value) VALUES (?, ?)", (1, "v1")
     )

 .. note:: The :meth:`_engine.Connection.exec_driver_sql` method does
     not participate in the
     :meth:`_events.ConnectionEvents.before_execute` and
     :meth:`_events.ConnectionEvents.after_execute` events.   To
     intercept calls to :meth:`_engine.Connection.exec_driver_sql`, use
     :meth:`_events.ConnectionEvents.before_cursor_execute` and
     :meth:`_events.ConnectionEvents.after_cursor_execute`.

 .. seealso::

    :pep:`249`



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é