From 17036f7c527f6a50abd70e5d06f6e173ff4fa9f6 Mon Sep 17 00:00:00 2001 From: junjun Date: Tue, 26 Aug 2025 18:03:05 +0800 Subject: [PATCH] feat: Ask to add database version information --- backend/apps/db/db_sql.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/apps/db/db_sql.py b/backend/apps/db/db_sql.py index 30f06409..48282bf6 100644 --- a/backend/apps/db/db_sql.py +++ b/backend/apps/db/db_sql.py @@ -14,7 +14,7 @@ def get_version_sql(ds: CoreDatasource, conf: DatasourceConf): """ elif ds.type == "pg" or ds.type == "excel": return f""" - select version() + SELECT current_setting('server_version') """ elif ds.type == "oracle": return f""" @@ -29,6 +29,7 @@ def get_version_sql(ds: CoreDatasource, conf: DatasourceConf): SELECT * FROM v$version """ + def get_table_sql(ds: CoreDatasource, conf: DatasourceConf): if ds.type == "mysql" or ds.type == "doris": return f"""