summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/session.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-11-01 15:44:44 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-11-07 14:30:35 -0500
commitd050193daaa8d91371c759296f3304b8641c1976 (patch)
treef3f880ccd528d1dc6c1dafa1a19b71c7c953fdce /lib/sqlalchemy/orm/session.py
parent248d232459e38561999c4172acaaddd651c1a933 (diff)
downloadsqlalchemy-d050193daaa8d91371c759296f3304b8641c1976.tar.gz
fully implement future engine and remove legacy
The major action here is to lift and move future.Connection and future.Engine fully into sqlalchemy.engine.base. This removes lots of engine concepts, including: * autocommit * Connection running without a transaction, autobegin is now present in all cases * most "autorollback" is obsolete * Core-level subtransactions (i.e. MarkerTransaction) * "branched" connections, copies of connections * execution_options() returns self, not a new connection * old argument formats, distill_params(), simplifies calling scheme between engine methods * before/after_execute() events (oriented towards compiled constructs) don't emit for exec_driver_sql(). before/after_cursor_execute() is still included for this * old helper methods superseded by context managers, connection.transaction(), engine.transaction() engine.run_callable() * ancient engine-level reflection methods has_table(), table_names() * sqlalchemy.testing.engines.proxying_engine References: #7257 Change-Id: Ib20ed816642d873b84221378a9ec34480e01e82c
Diffstat (limited to 'lib/sqlalchemy/orm/session.py')
-rw-r--r--lib/sqlalchemy/orm/session.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py
index 415826e5f..c76ece5de 100644
--- a/lib/sqlalchemy/orm/session.py
+++ b/lib/sqlalchemy/orm/session.py
@@ -1499,6 +1499,11 @@ class Session(_SessionClassMethods):
by :meth:`_engine.Connection.execution_options`, and may also
provide additional options understood only in an ORM context.
+ .. seealso::
+
+ :ref:`orm_queryguide_execution_options` - ORM-specific execution
+ options
+
:param bind_arguments: dictionary of additional arguments to determine
the bind. May include "mapper", "bind", or other custom arguments.
Contents of this dictionary are passed to the
@@ -1592,7 +1597,7 @@ class Session(_SessionClassMethods):
bind = self.get_bind(**bind_arguments)
conn = self._connection_for_bind(bind)
- result = conn._execute_20(statement, params or {}, execution_options)
+ result = conn.execute(statement, params or {}, execution_options)
if compile_state_cls:
result = compile_state_cls.orm_setup_cursor_result(