summaryrefslogtreecommitdiffstats
path: root/sqlglot/executor
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-07 12:35:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-07 12:35:04 +0000
commitfb7e79eb4c8d6e22b7324de4bb1ea9cd11b8da7c (patch)
tree476513580a6824dfe34364f98f0dbf7f66d188f4 /sqlglot/executor
parentReleasing debian version 11.4.5-1. (diff)
downloadsqlglot-fb7e79eb4c8d6e22b7324de4bb1ea9cd11b8da7c.tar.xz
sqlglot-fb7e79eb4c8d6e22b7324de4bb1ea9cd11b8da7c.zip
Merging upstream version 11.5.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/executor')
-rw-r--r--sqlglot/executor/env.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sqlglot/executor/env.py b/sqlglot/executor/env.py
index ba9cbbd..8f64cce 100644
--- a/sqlglot/executor/env.py
+++ b/sqlglot/executor/env.py
@@ -173,4 +173,11 @@ ENV = {
"SUBSTRING": substring,
"TIMESTRTOTIME": null_if_any(lambda arg: datetime.datetime.fromisoformat(arg)),
"UPPER": null_if_any(lambda arg: arg.upper()),
+ "YEAR": null_if_any(lambda arg: arg.year),
+ "MONTH": null_if_any(lambda arg: arg.month),
+ "DAY": null_if_any(lambda arg: arg.day),
+ "CURRENTDATETIME": datetime.datetime.now,
+ "CURRENTTIMESTAMP": datetime.datetime.now,
+ "CURRENTTIME": datetime.datetime.now,
+ "CURRENTDATE": datetime.date.today,
}