Ligare.database.engine.sqlite
Integrations with SQLAlchemy’s SQLite engine.
Classes
|
- class Ligare.database.engine.sqlite.SQLiteScopedSession(session_factory, scopefunc=None)[source]
- __init__(session_factory, scopefunc=None)[source]
Construct a new
scoped_session
.- Parameters:
session_factory – a factory to create new
Session
instances. This is usually, but not necessarily, an instance ofsessionmaker
.scopefunc – optional function which defines the current scope. If not passed, the
scoped_session
object assumes “thread-local” scope, and will use a Pythonthreading.local()
in order to maintain the currentSession
. If passed, the function should return a hashable token; this token will be used as the key in a dictionary in order to store and retrieve the currentSession
.