diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2021-10-31 20:48:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2021-10-31 20:48:33 +0000 |
commit | f5956e13d5bc456802a09a0ed89b3c596161e390 (patch) | |
tree | d02b0e34e549c9b00aaad6fef25edf7f000380e6 /lib/sqlalchemy/sql/base.py | |
parent | a1adb21cbe83ecce467194ab0e3277db581dfa4d (diff) | |
parent | aa026c302c6b188a7e28508f9ecb603809b9e03f (diff) | |
download | sqlalchemy-f5956e13d5bc456802a09a0ed89b3c596161e390.tar.gz |
Merge "2.0 removals: LegacyRow, connectionless execution, close_with_result" into main
Diffstat (limited to 'lib/sqlalchemy/sql/base.py')
-rw-r--r-- | lib/sqlalchemy/sql/base.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py index aba80222a..4bcb655d6 100644 --- a/lib/sqlalchemy/sql/base.py +++ b/lib/sqlalchemy/sql/base.py @@ -937,46 +937,6 @@ class Executable(roles.StatementRole, Generative): """ return self._execution_options - @util.deprecated_20( - ":meth:`.Executable.execute`", - alternative="All statement execution in SQLAlchemy 2.0 is performed " - "by the :meth:`_engine.Connection.execute` method of " - ":class:`_engine.Connection`, " - "or in the ORM by the :meth:`.Session.execute` method of " - ":class:`.Session`.", - ) - def execute(self, *multiparams, **params): - """Compile and execute this :class:`.Executable`.""" - e = self.bind - if e is None: - label = ( - getattr(self, "description", None) or self.__class__.__name__ - ) - msg = ( - "This %s is not directly bound to a Connection or Engine. " - "Use the .execute() method of a Connection or Engine " - "to execute this construct." % label - ) - raise exc.UnboundExecutionError(msg) - return e._execute_clauseelement( - self, multiparams, params, util.immutabledict() - ) - - @util.deprecated_20( - ":meth:`.Executable.scalar`", - alternative="Scalar execution in SQLAlchemy 2.0 is performed " - "by the :meth:`_engine.Connection.scalar` method of " - ":class:`_engine.Connection`, " - "or in the ORM by the :meth:`.Session.scalar` method of " - ":class:`.Session`.", - ) - def scalar(self, *multiparams, **params): - """Compile and execute this :class:`.Executable`, returning the - result's scalar representation. - - """ - return self.execute(*multiparams, **params).scalar() - @property @util.deprecated_20( ":attr:`.Executable.bind`", |