Skip to content

Commit f5139cb

Browse files
committed
Add support for DATETIME() function call as a SQLite default values.
Fixes dimitri#1177.
1 parent 689dd4a commit f5139cb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/sources/sqlite/sqlite-cast-rules.lisp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@
107107
(string= "CURRENT TIMESTAMP" default)))
108108
:current-timestamp)
109109

110+
((and (stringp default)
111+
;; we don't care about spaces in that expression
112+
(string-equal "datetime('now','localtime')"
113+
(remove #\Space default)))
114+
:current-timestamp)
115+
110116
((and (stringp default) (string-equal "current_date" default))
111117
:current-date)
112118

test/sqlite/sqlite.db

4 KB
Binary file not shown.

0 commit comments

Comments
 (0)