API Reference

Many of these classes are missing methods from the SQLALchemy API. We encourage you to file bugs in those cases.

class alchimia.engine.TwistedEngine

Mostly like sqlalchemy.engine.Engine except some of the methods return Deferreds.

connect()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with a TwistedConnection.

execute(*args, **kwargs)

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with a TwistedResultProxy.

has_table(table_name, schema=None)

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with the result.

table_names(schema=None, connection=None)

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with the result.

class alchimia.engine.TwistedConnection

Mostly like sqlalchemy.engine.Connection except some of the methods return Deferreds.

execute(*args, **kwargs)

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with a TwistedResultProxy.

close()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires when the connection has been closed.

closed

Like the SQLAlchemy attribute of the same name.

begin()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with a TwistedTransaction.

in_transaction()

Like the SQLAlchemy method of the same name.

class alchimia.engine.TwistedTransaction

Mostly like sqlalchemy.engine.Transaction except some of the methods return Deferreds.

commit()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires when the transaction has been committed.

rollback()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires when the transaction has been rolled back.

closed()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires when the transaction has been closed.

class alchimia.engine.TwistedResultProxy

Mostly like sqlalchemy.engine.ResultProxy except some of the methods return Deferreds.

fetchone()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with a row.

fetchall()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with a list of rows.

scalar()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with the scalar value.

first()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with the scalar value.

keys()

Like the SQLAlchemy method of the same name, except returns a Deferred which fires with the scalar value.

close()

Like the SQLAlchemy method of the same name, it releases the resources used and releases the underlying DB connection.

returns_rows

Like the SQLAlchemy attribute of the same name.

rowcount

Like the SQLAlchemy attribute of the same name.

inserted_primary_key

Like the SQLAlchemy attribute of the same name.