From a6a7fa5d7982c2cc2678ab6a973883adb98c8f27 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 26 Sep 2012 10:20:56 -0400 Subject: [PATCH] - [feature] Added support for the localtimestamp() SQL function implemented in SQLite, courtesy Richard Mitchell. Added test --- CHANGES | 4 ++++ test/dialect/test_sqlite.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGES b/CHANGES index 289876b074..b1bf31a8b3 100644 --- a/CHANGES +++ b/CHANGES @@ -165,6 +165,10 @@ CHANGES 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 diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py index f84499067d..b7b61640e7 100644 --- a/test/dialect/test_sqlite.py +++ b/test/dialect/test_sqlite.py @@ -505,6 +505,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, -- 2.47.2