]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- [feature] Added support for the localtimestamp()
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Sep 2012 14:20:56 +0000 (10:20 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Sep 2012 14:20:56 +0000 (10:20 -0400)
SQL function implemented in SQLite, courtesy
Richard Mitchell.  Added test

CHANGES
test/dialect/test_sqlite.py

diff --git a/CHANGES b/CHANGES
index 46091f077c2c85c8f864ab4e0776eed90b044d6e..a727501a76d9df65ba9d632ca82740102cf447c9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -905,6 +905,10 @@ are also present in 0.8.
     old SQLite versions that don't deliver
     default info as a string.  [ticket:2265]
 
+  - [feature] Added support for the localtimestamp()
+    SQL function implemented in SQLite, courtesy
+    Richard Mitchell.
+
 - postgresql
   - [bug] Columns in reflected primary key constraint
     are now returned in the order in which the constraint
index 3f714b8255e23297281b668b28da45bd8f9a28ec..07995cdc4bd6da32d05f59c0b5cc43c39d3011ad 100644 (file)
@@ -590,6 +590,12 @@ class SQLTest(fixtures.TestBase, AssertsCompiledSQL):
             "1"
         )
 
+    def test_localtime(self):
+        self.assert_compile(
+            func.localtimestamp(),
+            'DATETIME(CURRENT_TIMESTAMP, "localtime")'
+        )
+
     def test_constraints_with_schemas(self):
         metadata = MetaData()
         t1 = Table('t1', metadata,