class documentation

class _SessionClassMethods(object):

Known subclasses: sqlalchemy.orm.session.Session, sqlalchemy.orm.session.sessionmaker

View In Hierarchy

Class-level methods for .Session, .sessionmaker.
Class Method close​_all Close all sessions in memory.
Class Method identity​_key Return an identity key.
Class Method object​_session Return the .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):
Close all sessions in memory.
@classmethod
@util.preload_module('sqlalchemy.orm.util')
def identity_key(cls, *args, **kwargs):

Return an identity key.

This is an alias of .util.identity_key.

@classmethod
def object_session(cls, instance):

Return the .Session to which an object belongs.

This is an alias of .object_session.