The heat.db.sqlalchemy.session Module

Session Handling for SQLAlchemy backend.

class heat.db.sqlalchemy.session.MySQLPingListener[source]

Bases: object

Ensures that MySQL connections checked out of the pool are alive.

Borrowed from: http://groups.google.com/group/sqlalchemy/msg/a4ce563d802c929f

checkout(dbapi_con, con_record, con_proxy)[source]
class heat.db.sqlalchemy.session.SynchronousSwitchListener[source]

Bases: sqlalchemy.interfaces.PoolListener

Switch sqlite connections to non-synchronous mode

connect(dbapi_con, con_record)[source]
heat.db.sqlalchemy.session.get_engine()[source]

Return a SQLAlchemy engine.

heat.db.sqlalchemy.session.get_maker(engine, autocommit=True, expire_on_commit=False)[source]

Return a SQLAlchemy sessionmaker using the given engine.

heat.db.sqlalchemy.session.get_session(autocommit=True, expire_on_commit=False)[source]

Return a SQLAlchemy session.

This Page