The attached patch implements a Microsoft SQL Server engine for Sql Alchemy.

This module passes most unitests, but is still in a fairly early stage and should be considered for experimental use only.

Thanks to Runar Petursson for earlier work on this module.

Rick


Release notes
---------------------
 Both pymssql (*ix, Windows), and adodbapi (Windows only) are supported.

  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 /OFF modes (via automagic on / off for INSERTs)

  support for auto-fetching of @@IDENTITY on insert

  select.limit implemented as SELECT TOP n

Known issues / TODO:
-----------------------------------
  table reflection can be slow
  no support for OFFSET (no support in MSSQL7 / 2000)
  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 transaction control that this module attempts to work around
  pymssql has problems with binary and unicode data that this module does NOT work around
  adodbapi fails testtypes.py unit test on unicode data too -- issue with the test?

Attachment: mssql.patch
Description: Binary data

Reply via email to