diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-16 09:41:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-16 09:41:15 +0000 |
commit | 358a09296d7198a4cc142f1976de8f3eb3318e58 (patch) | |
tree | 762db96c44014dc4db5e9fc7f6709c138589155e /sqlglot/dialects/sqlite.py | |
parent | Adding upstream version 15.2.0. (diff) | |
download | sqlglot-358a09296d7198a4cc142f1976de8f3eb3318e58.tar.xz sqlglot-358a09296d7198a4cc142f1976de8f3eb3318e58.zip |
Adding upstream version 16.2.1.upstream/16.2.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/sqlite.py')
-rw-r--r-- | sqlglot/dialects/sqlite.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sqlglot/dialects/sqlite.py b/sqlglot/dialects/sqlite.py index 4e800b0..3b837ea 100644 --- a/sqlglot/dialects/sqlite.py +++ b/sqlglot/dialects/sqlite.py @@ -5,6 +5,7 @@ from sqlglot.dialects.dialect import ( Dialect, arrow_json_extract_scalar_sql, arrow_json_extract_sql, + concat_to_dpipe_sql, count_if_to_sum, no_ilike_sql, no_pivot_sql, @@ -62,10 +63,6 @@ class SQLite(Dialect): IDENTIFIERS = ['"', ("[", "]"), "`"] HEX_STRINGS = [("x'", "'"), ("X'", "'"), ("0x", ""), ("0X", "")] - KEYWORDS = { - **tokens.Tokenizer.KEYWORDS, - } - class Parser(parser.Parser): FUNCTIONS = { **parser.Parser.FUNCTIONS, @@ -100,6 +97,7 @@ class SQLite(Dialect): TRANSFORMS = { **generator.Generator.TRANSFORMS, + exp.Concat: concat_to_dpipe_sql, exp.CountIf: count_if_to_sum, exp.Create: transforms.preprocess([_transform_create]), exp.CurrentDate: lambda *_: "CURRENT_DATE", @@ -116,6 +114,7 @@ class SQLite(Dialect): exp.LogicalOr: rename_func("MAX"), exp.LogicalAnd: rename_func("MIN"), exp.Pivot: no_pivot_sql, + exp.SafeConcat: concat_to_dpipe_sql, exp.Select: transforms.preprocess( [transforms.eliminate_distinct_on, transforms.eliminate_qualify] ), |