예제 #1
0
 def __init__(self, repository):
     SessionFactory.__init__(self, repository)
     if self._repository.autocommit:
         # Use an autocommitting Session class with our session factory.
         self.__fac = scoped_session(
             sessionmaker(class_=SaAutocommittingSession))
     else:
         # Use the default Session factory.
         self.__fac = ScopedSessionMaker
예제 #2
0
 def __init__(self, repository):
     SessionFactory.__init__(self, repository)
     if self._repository.autocommit:
         # Use an autocommitting Session class with our session factory.
         self.__fac = scoped_session(
                             sessionmaker(class_=SaAutocommittingSession))
     else:
         # Use the default Session factory.
         self.__fac = ScopedSessionMaker
예제 #3
0
파일: session.py 프로젝트: papagr/everest
 def __init__(self, repository, counting_query_class):
     SessionFactory.__init__(self, repository)
     if self._repository.autocommit:
         # Use an autocommitting Session class with our session factory.
         self.__fac = scoped_session(
                             sessionmaker(class_=RdbAutocommittingSession))
     else:
         # Use the default Session factory.
         self.__fac = ScopedSessionMaker
     #: This is the (optimized, if the engine supports it) counting query
     #: class used for paged queries.
     self.counting_query_class = counting_query_class
예제 #4
0
 def __init__(self, repository):
     SessionFactory.__init__(self, repository)
     self.__session_registry = local()
예제 #5
0
 def __init__(self, repository, query_class=None, clone_on_load=True):
     SessionFactory.__init__(self, repository)
     sess_reg = local()
     self.__session_registry = sess_reg
     self.__query_class = query_class
     self.__clone_on_load = clone_on_load
예제 #6
0
 def __init__(self, repository):
     SessionFactory.__init__(self, repository)
     self.__session_registry = local()
예제 #7
0
파일: session.py 프로젝트: helixyte/everest
 def __init__(self, repository, query_class=None, clone_on_load=True):
     SessionFactory.__init__(self, repository)
     sess_reg = local()
     self.__session_registry = sess_reg
     self.__query_class = query_class
     self.__clone_on_load = clone_on_load