# SQLAlchemy 0.4 Documentation

Multiple Pages | One Page
Version: 0.4.6 Last Updated: 05/14/08 14:36:43

### module sqlalchemy.engine.default

Default implementations of per-dialect sqlalchemy.engine classes.

These are semi-private implementation classes which are only of importance to database dialect authors; dialects will usually use the classes here as the base class for their own corresponding classes.

### class DefaultDialect(Dialect)

Default implementation of Dialect

def __init__(self, convert_unicode=False, assert_unicode=False, encoding='utf-8', paramstyle=None, dbapi=None, **kwargs)

Construct a new `DefaultDialect`.

def create_execution_context(self, connection, **kwargs)
def create_xid(self)

Create a random two-phase transaction ID.

This id will be passed to do_begin_twophase(), do_rollback_twophase(), do_commit_twophase(). Its format is unspecified.

def do_begin(self, connection)

Implementations might want to put logic here for turning autocommit on/off, etc.

def do_commit(self, connection)

Implementations might want to put logic here for turning autocommit on/off, etc.

def do_execute(self, cursor, statement, parameters, context=None)
def do_executemany(self, cursor, statement, parameters, context=None)
def do_release_savepoint(self, connection, name)
def do_rollback(self, connection)

Implementations might want to put logic here for turning autocommit on/off, etc.

def do_rollback_to_savepoint(self, connection, name)
def do_savepoint(self, connection, name)
def is_disconnect(self, e)
def oid_column_name(self, column)
def type_descriptor(self, typeobj)

Provide a database-specific `TypeEngine` object, given the generic object which comes from the types module.

Subclasses will usually use the `adapt_type()` method in the types module to make this job easy.

back to section top

### class DefaultExecutionContext(ExecutionContext)

def __init__(self, dialect, connection, compiled=None, statement=None, parameters=None)

Construct a new `DefaultExecutionContext`.

connection = property()
def create_cursor(self)
def get_result_proxy(self)
def get_rowcount(self)
def last_inserted_ids(self)
def last_inserted_params(self)
def last_updated_params(self)
def lastrow_has_defaults(self)
def post_exec(self)
def post_execution(self)
def pre_exec(self)
def pre_execution(self)
def result(self)
def returns_rows_compiled(self, compiled)
def returns_rows_text(self, statement)
def set_input_sizes(self)

Given a cursor and ClauseParameters, call the appropriate style of `setinputsizes()` on the cursor, using DB-API types from the bind parameter's `TypeEngine` objects.

def should_autocommit_compiled(self, compiled)
def should_autocommit_text(self, statement)
def supports_sane_multi_rowcount(self)
def supports_sane_rowcount(self)
back to section top