fix(tdengine): SHOW STABLES 去掉 FROM 子句,依赖 DBQuery 的数据库上下文

SHOW STABLES FROM db 在某些 TDengine 版本/驱动中可能不兼容,
改为直接使用 SHOW STABLES,通过 DBQuery 的 dbName 参数设置数据库上下文。
This commit is contained in:
Syngnat
2026-08-03 10:45:20 +08:00
parent add349af34
commit b7774f8d75

View File

@@ -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) => {