class documentation
class _SessionClassMethods: (source)
Known subclasses: sqlalchemy.orm.session.Session
, sqlalchemy.orm.session.sessionmaker
Class-level methods for :class:`.Session`, :class:`.sessionmaker`.
Class Method | close |
Close *all* sessions in memory. |
Class Method | identity |
Return an identity key. |
Class Method | object |
Return the :class:`.Session` to which an object belongs. |
@classmethod
@util.deprecated( '1.3', 'The :meth:`.Session.close_all` method is deprecated and will be removed in a future release. Please refer to :func:`.session.close_all_sessions`.')
def close_all(cls): (source) ¶
@util.deprecated(
def close_all(cls): (source) ¶
Close *all* sessions in memory.
@classmethod
@util.preload_module( 'sqlalchemy.orm.util')
def identity_key(cls, class_:
@util.preload_module(
def identity_key(cls, class_:
Optional[ Type[ Any]]
= None, ident: Union[ Any, Tuple[ Any, ...]]
= None, *, instance: Optional[ Any]
= None, row: Optional[ Union[ Row[ Any], RowMapping]]
= None, identity_token: Optional[ Any]
= None) -> _IdentityKeyType[ Any]
:
(source)
¶
Return an identity key. This is an alias of :func:`.util.identity_key`.