mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-06-13 18:09:39 +08:00
- 抽取表查询模板 helper 并统一复用方言标识符引用逻辑 - 修正 Sidebar 与 TableOverview 的表节点新建查询入口 - 补充前端回归测试并更新 issue backlog 记录 Fixes #349
10 lines
339 B
TypeScript
10 lines
339 B
TypeScript
import { quoteQualifiedIdent } from './sql';
|
|
|
|
export const buildTableSelectQuery = (dbType: string, tableName: string): string => {
|
|
const normalizedTableName = String(tableName || '').trim();
|
|
if (!normalizedTableName) {
|
|
return 'SELECT * FROM ';
|
|
}
|
|
return `SELECT * FROM ${quoteQualifiedIdent(dbType, normalizedTableName)};`;
|
|
};
|