From 75d716c7799e28ba5c86c72db08025dd6fc8c6e0 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 19 May 2023 09:50:09 -0400 Subject: [PATCH] clarify exec_driver_sql this docstring wasn't really saying what this method was for. Change-Id: I2d83ed2690c93d215faadaf7c6edcb02c6c57a6f --- lib/sqlalchemy/engine/base.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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:: -- 2.39.5