mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: fix Elasticsearch error
This commit is contained in:
@@ -140,6 +140,8 @@ def get_table_sql(ds: CoreDatasource, conf: DatasourceConf, db_version: str = ''
|
||||
WHERE
|
||||
TABLE_SCHEMA = %s
|
||||
""", conf.database
|
||||
elif ds.type == "es":
|
||||
return "", None
|
||||
|
||||
|
||||
def get_field_sql(ds: CoreDatasource, conf: DatasourceConf, table_name: str = None):
|
||||
@@ -273,3 +275,5 @@ def get_field_sql(ds: CoreDatasource, conf: DatasourceConf, table_name: str = No
|
||||
"""
|
||||
sql2 = " AND TABLE_NAME = %s" if table_name is not None and table_name != "" else ""
|
||||
return sql1 + sql2, conf.database, table_name
|
||||
elif ds.type == "es":
|
||||
return "", None, None
|
||||
|
||||
Reference in New Issue
Block a user