Skip to content

Commit

Permalink
Merge pull request #2 from mindsdb/id-keywords
Browse files Browse the repository at this point in the history
Added Id keywords from which worked in mysql dialect
  • Loading branch information
ea-rus authored Nov 22, 2024
2 parents 666df66 + f968191 commit 647d887
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mindsdb_sql_parser/__about__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__title__ = 'mindsdb_sql_parser'
__package_name__ = 'mindsdb_sql_parser'
__version__ = '0.0.1'
__version__ = '0.0.2'
__description__ = "Mindsdb SQL parser"
__email__ = "[email protected]"
__author__ = 'MindsDB Inc'
Expand Down
2 changes: 1 addition & 1 deletion mindsdb_sql_parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def query_is_valid(self, tokens):
return ast is not None


def parse_sql(sql):
def parse_sql(sql, dialect=None):
from mindsdb_sql_parser.lexer import MindsDBLexer
from mindsdb_sql_parser.parser import MindsDBParser
lexer, parser = MindsDBLexer(), MindsDBParser()
Expand Down
18 changes: 18 additions & 0 deletions mindsdb_sql_parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1847,8 +1847,26 @@ def function_name(self, p):
'HANDLERS',
'BINARY',
'KNOWLEDGE_BASES',
'KNOWLEDGE_BASE',
'ALL',
'CREATE',
'SKILL',
'FINETUNE',
'IF',
'EXISTS',
'EVERY',
'ANOMALY',
'ML_ENGINE',
'EVALUATE',
'DETECTION',
'JOB',
# fixme
# 'EXCEPT',
# 'INTERSECT',
'PROJECT',
'TRIGGER',
'CHATBOT',
'SEARCH_PATH'
)
def id(self, p):
return p[0]
Expand Down

0 comments on commit 647d887

Please sign in to comment.