SQLAlchemy 0.4 Documentation

Multiple Pages | One Page
Version: 0.4 Last Updated: 08/16/07 11:15:18

module sqlalchemy.engine.threadlocal

class TLConnection(Connection)

def __init__(self, session, close_with_result)

Construct a new TLConnection.

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 Pool 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)

Construct a new TLSession.

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(RootTransaction)

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