diff --git a/mindsdb_sql_parser/__about__.py b/mindsdb_sql_parser/__about__.py index 1ec9c61..6d808bc 100644 --- a/mindsdb_sql_parser/__about__.py +++ b/mindsdb_sql_parser/__about__.py @@ -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__ = "jorge@mindsdb.com" __author__ = 'MindsDB Inc' diff --git a/mindsdb_sql_parser/__init__.py b/mindsdb_sql_parser/__init__.py index 3ecc30f..f185268 100644 --- a/mindsdb_sql_parser/__init__.py +++ b/mindsdb_sql_parser/__init__.py @@ -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() diff --git a/mindsdb_sql_parser/parser.py b/mindsdb_sql_parser/parser.py index 44aa2dc..8dd87d8 100644 --- a/mindsdb_sql_parser/parser.py +++ b/mindsdb_sql_parser/parser.py @@ -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]