Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Id keywords from which worked in mysql dialect #2

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading