Skip to content

Commit

Permalink
use "i" prefix for case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
klahnakoski committed Sep 8, 2024
1 parent f817167 commit 9c6d231
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mo_sql_parsing/keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
INTERSECT = keyword("intersect")
INTERVAL = keyword("interval")
INTO = keyword("into").suppress()
IREGEXP = Literal("~*").set_parser_name("regexp_i")
IS = keyword("is")
JOIN = keyword("join")
JSON_CONTAINS = Literal("?").set_parser_name("json_contains")
Expand Down Expand Up @@ -103,7 +104,7 @@
NEQ = (Literal("!=") | Literal("<>")).set_parser_name("neq")
NOCASE = keyword("nocase")
NOT = keyword("not")
NOT_REGEXP_I = Literal("!~*").set_parser_name("not_regexp_i")
NOT_IREGEXP = Literal("!~*").set_parser_name("not_regexp_i")
OFFSET = keyword("offset").suppress()
ON = keyword("on").suppress()
OR = keyword("or")
Expand All @@ -119,7 +120,6 @@
REFERENCES = keyword("references").suppress()
_REGEXP = keyword("regexp")
REGEXP = (_REGEXP | Literal("~")).set_parser_name("regexp")
REGEXP_I = Literal("~*").set_parser_name("regexp_i")
RIGHT = keyword("right")
RLIKE = keyword("rlike")
SAMPLE = keyword("sample").suppress()
Expand Down Expand Up @@ -398,7 +398,7 @@
AND,
OR,
ASSIGN,
NOT_REGEXP_I | NOT_REGEXP | REGEXP_I | REGEXP,
NOT_IREGEXP | NOT_REGEXP | IREGEXP | REGEXP,
]

times = ["now", "today", "tomorrow", "eod"]
Expand Down

0 comments on commit 9c6d231

Please sign in to comment.