SQLAlchemy 0.3 Documentation
- Module Functions
- class AdoMSNVarchar(MSNVarchar)
- class AdoMSUnicode(MSUnicode)
- class MSBinary(Binary)
- class MSBoolean(Boolean)
- class MSChar(CHAR)
- class MSDate(Date)
- class MSDateTime(DateTime)
- class MSFloat(Float)
- class MSInteger(Integer)
- class MSNChar(NCHAR)
- class MSNVarchar(MSString)
- class MSNumeric(Numeric)
- class MSSQLCompiler(ANSICompiler)
- class MSSQLDefaultRunner(ANSIDefaultRunner)
- class MSSQLDialect(ANSIDialect)
- class MSSQLDialect(ANSIDialect)
- class MSSQLDialect_adodbapi(MSSQLDialect)
- class MSSQLDialect_pymssql(MSSQLDialect)
- class MSSQLDialect_pyodbc(MSSQLDialect)
- class MSSQLExecutionContext(DefaultExecutionContext)
- class MSSQLIdentifierPreparer(ANSIIdentifierPreparer)
- class MSSQLSchemaDropper(ANSISchemaDropper)
- class MSSQLSchemaGenerator(ANSISchemaGenerator)
- class MSSmallInteger(SmallInteger)
- class MSString(String)
- class MSText(TEXT)
- class MSTinyInteger(Integer)
- class MSUnicode(Unicode)
module sqlalchemy.databases.mssql
MSSQL backend, thru either pymssq, adodbapi or pyodbc interfaces.
IDENTITY columns are supported by using SA schema.Sequence() objects. In other words:
Table('test', mss_engine, Column('id', Integer, Sequence('blah',100,10), primary_key=True), Column('name', String(20)) ).create()
would yield:
CREATE TABLE test ( id INTEGER NOT NULL IDENTITY(100,10) PRIMARY KEY, name VARCHAR(20) )
Note that the start & increment values for sequences are optional and will default to 1,1.
Support for SET IDENTITY_INSERT ON mode (automagic on / off for INSERT s)
Support for auto-fetching of @@IDENTITY on INSERT
select.limit implemented as SELECT TOP n
Known issues / TODO:
- No support for more than one IDENTITY column per table
- No support for table reflection of IDENTITY columns with (seed,increment) values other than (1,1)
- No support for GUID type columns (yet)
- pymssql has problems with binary and unicode data that this module does not work around
class AdoMSNVarchar(MSNVarchar)
back to section topclass AdoMSUnicode(MSUnicode)
back to section topclass MSBoolean(Boolean)
back to section topclass MSDate(Date)
back to section topclass MSDateTime(DateTime)
back to section topclass MSFloat(Float)
By converting to string, we can use Decimal types round-trip.
class MSNVarchar(MSString)
NVARCHAR string, does Unicode conversion if dialect.convert_encoding is True.
class MSNumeric(Numeric)
back to section topclass MSSQLCompiler(ANSICompiler)
Move bind parameters to the right-hand side of an operator, where possible.
class MSSQLDefaultRunner(ANSIDefaultRunner)
back to section topclass MSSQLDialect(ANSIDialect)
Pull the raw pymmsql connection out--sensative to "pool.ConnectionFairy" and pymssql.pymssqlCnx Classes
class MSSQLDialect(ANSIDialect)
Pull the raw pymmsql connection out--sensative to "pool.ConnectionFairy" and pymssql.pymssqlCnx Classes
class MSSQLDialect_adodbapi(MSSQLDialect)
back to section topclass MSSQLDialect_pymssql(MSSQLDialect)
back to section topclass MSSQLDialect_pyodbc(MSSQLDialect)
back to section topclass MSSQLExecutionContext(DefaultExecutionContext)
Turn off the INDENTITY_INSERT mode if it's been activated, and fetch recently inserted IDENTIFY values (works only for one column).
MS-SQL has a special mode for inserting non-NULL values into IDENTITY columns.
Activate it if the feature is turned on and needed.
class MSSQLIdentifierPreparer(ANSIIdentifierPreparer)
back to section topclass MSSQLSchemaGenerator(ANSISchemaGenerator)
back to section topclass MSUnicode(Unicode)
Unicode subclass, does Unicode conversion in all cases, uses NVARCHAR impl.