diff options
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] ), |