]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Merge [3345] into trunk. Unit test still TODO
authorPaul Johnston <paj@pajhome.org.uk>
Fri, 17 Aug 2007 16:44:33 +0000 (16:44 +0000)
committerPaul Johnston <paj@pajhome.org.uk>
Fri, 17 Aug 2007 16:44:33 +0000 (16:44 +0000)
CHANGES
lib/sqlalchemy/databases/mssql.py

diff --git a/CHANGES b/CHANGES
index eb37dfde2d6f708e5970416c1de5ef88f5189b7e..0e12026e90a2ace27fb29ab1ccdb5090d98b4008 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -442,6 +442,8 @@ CHANGES
       when using pool with threadlocal setting
 - mssql
     - added support for TIME columns (simulated using DATETIME) [ticket:679]
+    - added support for BIGINT, MONEY, SMALLMONEY, UNIQUEIDENTIFIER and 
+      SQL_VARIANT [ticket:721]
     - index names are now quoted when dropping from reflected tables
       [ticket:684]
 - postgres
index bef3eb54190124d059ffb31127ef5ba0b413fc31..25238c6979115fa6f7cdc1126f387b151bfa47cd 100644 (file)
@@ -32,8 +32,6 @@ Known issues / TODO:
 
 * No support for more than one ``IDENTITY`` column per table
 
-* No support for ``GUID`` type columns (yet)
-
 * pymssql has problems with binary and unicode data that this module
   does **not** work around
   
@@ -81,11 +79,15 @@ class MSInteger(sqltypes.Integer):
     def get_col_spec(self):
         return "INTEGER"
 
-class MSTinyInteger(sqltypes.Integer): 
+class MSBigInteger(MSInteger):
+    def get_col_spec(self):
+        return "BIGINT"
+
+class MSTinyInteger(MSInteger):
     def get_col_spec(self):
         return "TINYINT"
 
-class MSSmallInteger(sqltypes.Smallinteger):
+class MSSmallInteger(MSInteger):
     def get_col_spec(self):
         return "SMALLINT"
 
@@ -244,6 +246,22 @@ class MSTimeStamp(sqltypes.TIMESTAMP):
     def get_col_spec(self):
         return "TIMESTAMP"
         
+class MSMoney(sqltypes.TypeEngine):
+    def get_col_spec(self):
+        return "MONEY"
+        
+class MSSmallMoney(MSMoney):
+    def get_col_spec(self):
+        return "SMALLMONEY"
+        
+class MSUniqueIdentifier(sqltypes.TypeEngine):
+    def get_col_spec(self):
+        return "UNIQUEIDENTIFIER"
+        
+class MSVariant(sqltypes.TypeEngine):
+    def get_col_spec(self):
+        return "SQL_VARIANT"
+        
 def descriptor():
     return {'name':'mssql',
     'description':'MSSQL',
@@ -369,6 +387,7 @@ class MSSQLDialect(ansisql.ANSIDialect):
 
     ischema_names = {
         'int' : MSInteger,
+        'bigint': MSBigInteger,
         'smallint' : MSSmallInteger,
         'tinyint' : MSTinyInteger,
         'varchar' : MSString,
@@ -383,10 +402,15 @@ class MSSQLDialect(ansisql.ANSIDialect):
         'datetime' : MSDateTime,
         'smalldatetime' : MSDate,
         'binary' : MSBinary,
+        'varbinary' : MSBinary,
         'bit': MSBoolean,
         'real' : MSFloat,
         'image' : MSBinary,
         'timestamp': MSTimeStamp,
+        'money': MSMoney,
+        'smallmoney': MSSmallMoney,
+        'uniqueidentifier': MSUniqueIdentifier,
+        'sql_variant': MSVariant,
     }
 
     def __new__(cls, dbapi=None, *args, **kwargs):