SQLAlchemy 0.3 Documentation

Multiple Pages | One Page
Version: 0.3.7 Last Updated: 04/30/07 00:08:52

module sqlalchemy.databases.mssql

MSSQL backend, thru either pymssq, adodbapi or pyodbc interfaces.

Known issues / TODO:

Module Functions

def descriptor()

class AdoMSNVarchar(MSNVarchar)

overrides bindparam/result processing to not convert any unicode strings

def convert_bind_param(self, value, dialect)
def convert_result_value(self, value, dialect)
back to section top

class MSBinary(Binary)

def get_col_spec(self)
back to section top

class MSBoolean(Boolean)

def convert_bind_param(self, value, dialect)
def convert_result_value(self, value, dialect)
def get_col_spec(self)
back to section top

class MSChar(CHAR)

def get_col_spec(self)
back to section top

class MSDate(Date)

def __init__(self, *a, **kw)
def convert_bind_param(self, value, dialect)
def convert_result_value(self, value, dialect)
def get_col_spec(self)
back to section top

class MSDateTime(DateTime)

def __init__(self, *a, **kw)
def convert_bind_param(self, value, dialect)
def convert_result_value(self, value, dialect)
def get_col_spec(self)
back to section top

class MSFloat(Float)

def convert_bind_param(self, value, dialect)

By converting to string, we can use Decimal types round-trip.

def get_col_spec(self)
back to section top

class MSInteger(Integer)

def get_col_spec(self)
back to section top

class MSNChar(NCHAR)

def get_col_spec(self)
back to section top

class MSNVarchar(MSString)

def get_col_spec(self)
back to section top

class MSNumeric(Numeric)

def convert_bind_param(self, value, dialect)
def convert_result_value(self, value, dialect)
def get_col_spec(self)
back to section top

class MSSQLCompiler(ANSICompiler)

def __init__(self, dialect, statement, parameters, **kwargs)
def for_update_clause(self, select)
def limit_clause(self, select)
def order_by_clause(self, select)
def visit_alias(self, alias)
def visit_binary(self, binary)

Move bind parameters to the right-hand side of an operator, where possible.

def visit_column(self, column)
def visit_function(self, func)
def visit_select(self, select)
def visit_select_precolumns(self, select)

MS-SQL puts TOP, it's version of LIMIT here

def visit_table(self, table)
back to section top

class MSSQLDefaultRunner(ANSIDefaultRunner)

back to section top

class MSSQLDialect(ANSIDialect)

def __init__(self, auto_identity_insert=True, **params)
def compiler(self, statement, bindparams, **kwargs)
def create_connect_args(self, url)
def create_execution_context(self, *args, **kwargs)
def dbapi(cls, module_name=None)
def defaultrunner(self, connection, **kwargs)
def do_execute(self, cursor, statement, params, **kwargs)
def get_default_schema_name(self)
def has_table(self, connection, tablename, schema=None)
def last_inserted_ids(self)
def preparer(self)
def raw_connection(self, connection)

Pull the raw pymmsql connection out--sensative to "pool.ConnectionFairy" and pymssql.pymssqlCnx Classes

def reflecttable(self, connection, table)
def schemadropper(self, *args, **kwargs)
def schemagenerator(self, *args, **kwargs)
def set_default_schema_name(self, schema_name)
def supports_sane_rowcount(self)
def type_descriptor(self, typeobj)
def uppercase_table(self, t)
back to section top

class MSSQLDialect_adodbapi(MSSQLDialect)

def import_dbapi(cls)
def is_disconnect(self, e)
def make_connect_string(self, keys)
def supports_sane_rowcount(self)
back to section top

class MSSQLDialect_pymssql(MSSQLDialect)

def create_connect_args(self, url)
def do_rollback(self, connection)
def import_dbapi(cls)
def is_disconnect(self, e)
def make_connect_string(self, keys)
def supports_sane_rowcount(self)
back to section top

class MSSQLDialect_pyodbc(MSSQLDialect)

def create_execution_context(self, *args, **kwargs)
def import_dbapi(cls)
def is_disconnect(self, e)
def make_connect_string(self, keys)
def supports_sane_rowcount(self)
back to section top

class MSSQLExecutionContext(DefaultExecutionContext)

def __init__(self, *args, **kwargs)
def post_exec(self)

Turn off the INDENTITY_INSERT mode if it's been activated, and fetch recently inserted IDENTIFY values (works only for one column).

def pre_exec(self)

MS-SQL has a special mode for inserting non-NULL values into IDENTITY columns.

Activate it if the feature is turned on and needed.

back to section top

class MSSQLExecutionContext_pyodbc(MSSQLExecutionContext)

def pre_exec(self)

execute "set nocount on" on all connections, as a partial workaround for multiple result set issues.

back to section top

class MSSQLIdentifierPreparer(ANSIIdentifierPreparer)

def __init__(self, dialect)
back to section top

class MSSQLSchemaDropper(ANSISchemaDropper)

def visit_index(self, index)
back to section top

class MSSQLSchemaGenerator(ANSISchemaGenerator)

def get_column_specification(self, column, **kwargs)
back to section top

class MSSmallInteger(SmallInteger)

def get_col_spec(self)
back to section top

class MSString(String)

def get_col_spec(self)
back to section top

class MSText(TEXT)

def get_col_spec(self)
back to section top

class MSTinyInteger(Integer)

def get_col_spec(self)
back to section top
Up: Generated Documentation | Previous: module sqlalchemy.databases.oracle | Next: module sqlalchemy.databases.firebird