summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2022-12-30 10:57:31 +0100
committerAndi Albrecht <albrecht.andi@gmail.com>2022-12-30 10:57:31 +0100
commite9241945801808d1db7f76bdccbbe9a200042c37 (patch)
treec596d3faf6328242c024ac636e77fbb76cdda042 /sqlparse
parent9f44d54c07180b826a6276d3acf5e1458b507c3f (diff)
downloadsqlparse-e9241945801808d1db7f76bdccbbe9a200042c37.tar.gz
Revert "add regex pattern to identify IN as a Compasion token"
This reverts commit 28c4d4026e1d9389a99d8cd627c96fa360c17fc4. See #694. The expectation is that IN is primarily recognized as a keyword, although it acts as a comparison operator. This also matches the definition of IN in most SQL syntax references where it is listed as a reserved keyword (PostgreSQL: https://www.postgresql.org/docs/current/sql-keywords-appendix.html, MySQL: https://dev.mysql.com/doc/refman/8.0/en/keywords.html, for example).
Diffstat (limited to 'sqlparse')
-rw-r--r--sqlparse/keywords.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlparse/keywords.py b/sqlparse/keywords.py
index d73e114..dff5e1c 100644
--- a/sqlparse/keywords.py
+++ b/sqlparse/keywords.py
@@ -50,7 +50,7 @@ SQL_REGEX = {
(r'(?<!\w)[$:?]\w+', tokens.Name.Placeholder),
(r'\\\w+', tokens.Command),
- (r'(NOT\s+)?(IN)\b', tokens.Operator.Comparison),
+
# FIXME(andi): VALUES shouldn't be listed here
# see https://github.com/andialbrecht/sqlparse/pull/64
# AS and IN are special, it may be followed by a parenthesis, but