plugins/sql: allow datetime functions

Changelog-Changed: Plugins:  now allows date and time sqlite functions.
This commit is contained in:
Joseph Goulden
2024-07-18 14:04:06 +01:00
committed by Rusty Russell
parent 6bfa303a4a
commit 89ede8a208
3 changed files with 30 additions and 2 deletions

View File

@@ -334,6 +334,20 @@ static int sqlite_authorize(void *dbq_, int code,
return SQLITE_OK;
if (streq(b, "total"))
return SQLITE_OK;
if (streq(b, "date"))
return SQLITE_OK;
if (streq(b, "datetime"))
return SQLITE_OK;
if (streq(b, "julianday"))
return SQLITE_OK;
if (streq(b, "strftime"))
return SQLITE_OK;
if (streq(b, "time"))
return SQLITE_OK;
if (streq(b, "timediff"))
return SQLITE_OK;
if (streq(b, "unixepoch"))
return SQLITE_OK;
}
/* See https://www.sqlite.org/c3ref/c_alter_table.html to decode these! */