mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-07 07:03:34 +08:00
fix(tdengine): SHOW STABLES 去掉 FROM 子句,依赖 DBQuery 的数据库上下文
SHOW STABLES FROM db 在某些 TDengine 版本/驱动中可能不兼容, 改为直接使用 SHOW STABLES,通过 DBQuery 的 dbName 参数设置数据库上下文。
This commit is contained in:
@@ -1694,13 +1694,7 @@ ${selectedTrigger.statement}`;
|
||||
};
|
||||
const rpcConfig = buildRpcConnectionConfig(config) as any;
|
||||
const dbName = tab.dbName || '';
|
||||
// Try SHOW STABLES with database name, fall back to SHOW STABLES without qualifier
|
||||
let res;
|
||||
if (dbName) {
|
||||
res = await DBQuery(rpcConfig, dbName, `SHOW STABLES FROM ${dbName}`);
|
||||
} else {
|
||||
res = await DBQuery(rpcConfig, '', 'SHOW STABLES');
|
||||
}
|
||||
const res = await DBQuery(rpcConfig, dbName, 'SHOW STABLES');
|
||||
if (cancelled) return;
|
||||
if (res.success && Array.isArray(res.data)) {
|
||||
const options = res.data.map((row: any) => {
|
||||
|
||||
Reference in New Issue
Block a user