backend.globaleaks.orm

Module Contents

Classes

transact Class decorator for managing transactions.
transact_sync Class decorator for managing transactions.

Functions

make_db_uri(db_file)
set_db_uri(db_uri)
get_db_uri()
get_engine(db_uri=None, foreign_keys=True)
get_session(db_uri=None, foreign_keys=True)
get_session_from_dbpath(db_path=None, foreign_keys=True)
enable_orm_debug()
set_thread_pool(thread_pool)
get_thread_pool()
tw(session, f, *args, **kwargs)
backend.globaleaks.orm._DEBUG = False[source]
backend.globaleaks.orm._DB_URI = sqlite:[source]
backend.globaleaks.orm._THREAD_POOL[source]
backend.globaleaks.orm.TRANSACTION_RETRIES = 20[source]
backend.globaleaks.orm.make_db_uri(db_file)[source]
backend.globaleaks.orm.set_db_uri(db_uri)[source]
backend.globaleaks.orm.get_db_uri()[source]
backend.globaleaks.orm.get_engine(db_uri=None, foreign_keys=True)[source]
backend.globaleaks.orm.get_session(db_uri=None, foreign_keys=True)[source]
backend.globaleaks.orm.get_session_from_dbpath(db_path=None, foreign_keys=True)[source]
backend.globaleaks.orm.enable_orm_debug()[source]
backend.globaleaks.orm.set_thread_pool(thread_pool)[source]
backend.globaleaks.orm.get_thread_pool()[source]
class backend.globaleaks.orm.transact(method)[source]

Bases: object

Class decorator for managing transactions.

__get__(self, instance, owner)[source]
__call__(self, *args, **kwargs)[source]
run(self, function, *args, **kwargs)[source]
_wrap(self, function, *args, **kwargs)[source]

Wrap provided function calling it inside a thread and passing the ORM session to it.

class backend.globaleaks.orm.transact_sync(method)[source]

Bases: backend.globaleaks.orm.transact

Class decorator for managing transactions.

run(self, function, *args, **kwargs)[source]
backend.globaleaks.orm.tw(session, f, *args, **kwargs)[source]