mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-13 00:13:33 +08:00
- 新增 RabbitMQ 管理 API 数据源实现,支持 vhost、queue、exchange 浏览与队列预览 - 统一消息发送弹窗,支持 Kafka Topic 与 RabbitMQ Queue 的测试发送命令生成 - 补齐连接表单、能力矩阵、SQL 方言、图标与前后端回归测试覆盖
13 lines
517 B
TypeScript
13 lines
517 B
TypeScript
import { quoteQualifiedIdent } from './sql';
|
|
|
|
export const buildTableSelectQuery = (dbType: string, tableName: string): string => {
|
|
const normalizedTableName = String(tableName || '').trim();
|
|
if (!normalizedTableName) {
|
|
return 'SELECT * FROM ';
|
|
}
|
|
if (['kafka', 'rabbitmq'].includes(String(dbType || '').trim().toLowerCase())) {
|
|
return `SELECT * FROM ${quoteQualifiedIdent(dbType, normalizedTableName)} LIMIT 100;`;
|
|
}
|
|
return `SELECT * FROM ${quoteQualifiedIdent(dbType, normalizedTableName)};`;
|
|
};
|