From: Mike Bayer Date: Fri, 19 May 2023 13:50:09 +0000 (-0400) Subject: clarify exec_driver_sql X-Git-Tag: rel_2_0_15~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75d716c7799e28ba5c86c72db08025dd6fc8c6e0;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git clarify exec_driver_sql this docstring wasn't really saying what this method was for. Change-Id: I2d83ed2690c93d215faadaf7c6edcb02c6c57a6f --- diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index dac7c94735..0ef057471d 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -1713,8 +1713,11 @@ class Connection(ConnectionEventsTarget, inspection.Inspectable["Inspector"]): parameters: Optional[_DBAPIAnyExecuteParams] = None, execution_options: Optional[CoreExecuteOptionsParameter] = None, ) -> CursorResult[Any]: - 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", @@ -1725,6 +1728,8 @@ class Connection(ConnectionEventsTarget, inspection.Inspectable["Inspector"]): 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::