From: Mike Bayer Date: Fri, 19 May 2023 13:50:09 +0000 (-0400) Subject: clarify exec_driver_sql X-Git-Tag: rel_1_4_49~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e465ce2788a726c614c060c11ae77b05d0b99af;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git clarify exec_driver_sql this docstring wasn't really saying what this method was for. Change-Id: I2d83ed2690c93d215faadaf7c6edcb02c6c57a6f (cherry picked from commit 75d716c7799e28ba5c86c72db08025dd6fc8c6e0) --- diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 084ca8d756..53916cc123 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -1712,8 +1712,11 @@ class Connection(Connectable): def exec_driver_sql( self, statement, parameters=None, execution_options=None ): - r"""Executes a SQL statement construct and returns a - :class:`_engine.CursorResult`. + r"""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", @@ -1724,6 +1727,8 @@ class Connection(Connectable): 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::