SQLAlchemy 0.3 Documentation

Multiple Pages | One Page
Version: 0.3.9 Last Updated: 07/15/07 12:30:22

module sqlalchemy.engine.threadlocal

class TLConnection(Connection)

def __init__(self, session, close_with_result)
def begin(self)
def close(self)
def in_transaction(self)
session = property()
back to section top

class TLEngine(Engine)

An Engine that includes support for thread-local managed transactions.

This engine is better suited to be used with threadlocal Pool object.

def __init__(self, *args, **kwargs)

The TLEngine relies upon the ConnectionProvider having "threadlocal" behavior, so that once a connection is checked out for the current thread, you get that same connection repeatedly.

def begin(self)
def commit(self)
def connect(self, **kwargs)

Return a Connection that is not thread-locally scoped.

This is the equivalent to calling connect() on a ComposedSQLEngine.

def contextual_connect(self, **kwargs)

Return a TLConnection which is thread-locally scoped.

def raw_connection(self)

Return a DBAPI connection.

def rollback(self)
session = property()

returns the current thread's TLSession

back to section top

class TLSession(object)

def __init__(self, engine)
def begin(self)
def commit(self)
def get_connection(self, close_with_result=False)
def in_transaction(self)
def is_begun(self)
def reset(self)
def rollback(self)
back to section top

class TLTransaction(Transaction)

def commit(self)
def rollback(self)
back to section top

class TLocalConnectionProvider(PoolConnectionProvider)

def unique_connection(self)
back to section top
Up: Generated Documentation | Previous: module sqlalchemy.engine.default | Next: module sqlalchemy.ansisql