SQLAlchemy 0.4 Documentation - module sqlalchemy.engine.default

# SQLAlchemy 0.4 Documentation

Multiple Pages | One Page
Version: 0.4 Last Updated: 08/22/07 15:48:11

### module sqlalchemy.engine.default

Default implementations of per-dialect sqlalchemy.engine classes.

### class DefaultDialect(Dialect)

Default implementation of Dialect

def __init__(self, convert_unicode=False, encoding='utf-8', default_paramstyle='named', 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 dbapi_type_map(self)
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)
ischema = property()

returns an ISchema object for this engine, which allows access to information_schema tables (if supported)

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 is_select(self)

return TRUE if the statement is expected to have result rows.

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 postfetch_cols(self)
def pre_exec(self)
def pre_execution(self)
def result(self)
root_connection = property()
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(self)
def supports_sane_rowcount(self)
back to section top