]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- added explicit MSTimeStamp type which takes effect when using
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 22 Mar 2007 16:50:38 +0000 (16:50 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 22 Mar 2007 16:50:38 +0000 (16:50 +0000)
types.TIMESTAMP.

CHANGES
lib/sqlalchemy/databases/mysql.py

diff --git a/CHANGES b/CHANGES
index 600350ca815caa4c9cd35546d593ccd2cd19a276..cd8e97ff1eed1a9249293cdcf69c88762a25bcfc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -64,6 +64,9 @@
     - added a catchall **kwargs to MSString, to help reflection of 
       obscure types (like "varchar() binary" in MS 4.0)
 
+    - added explicit MSTimeStamp type which takes effect when using 
+    types.TIMESTAMP.
+    
 - orm:
     - the full featureset of the SelectResults extension has been merged
       into a new set of methods available off of Query.  These methods
index e2784a1361ed0b847448fd322819b0d401e5c2eb..5fc63234a0e94bdca6170a5faabe285e798188d1 100644 (file)
@@ -124,6 +124,10 @@ class MSTime(sqltypes.Time):
         else:
             return None
 
+class MSTimeStamp(sqltypes.TIMESTAMP):
+    def get_col_spec(self):
+        return "TIMESTAMP"
+
 class MSText(sqltypes.TEXT):
     def __init__(self, **kw):
         self.binary = 'binary' in kw
@@ -232,8 +236,10 @@ colspecs = {
     sqltypes.Boolean : MSBoolean,
     sqltypes.TEXT : MSText,
     sqltypes.CHAR: MSChar,
+    sqltypes.TIMESTAMP: MSTimeStamp
 }
 
+
 ischema_names = {
     'boolean':MSBoolean,
     'bigint' : MSBigInteger,
@@ -251,7 +257,7 @@ ischema_names = {
     'numeric' : MSNumeric,
     'float' : MSFloat,
     'double' : MSDouble,
-    'timestamp' : MSDateTime,
+    'timestamp' : MSTimeStamp,
     'datetime' : MSDateTime,
     'date' : MSDate,
     'time' : MSTime,