mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
feat: support Elasticsearch datasource #108
This commit is contained in:
@@ -293,6 +293,10 @@ def preview(session: SessionDep, current_user: CurrentUser, id: int, data: Table
|
||||
sql = f"""SELECT "{'", "'.join(fields)}" FROM "{conf.dbSchema}"."{data.table.table_name}"
|
||||
{where}
|
||||
LIMIT 100"""
|
||||
elif ds.type == "es":
|
||||
sql = f"""SELECT "{'", "'.join(fields)}" FROM "{data.table.table_name}"
|
||||
{where}
|
||||
LIMIT 100"""
|
||||
return exec_sql(ds, sql, True)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user