fix(gbase8s): restore server name and table queries

Closes #5573
This commit is contained in:
t8y2 committed 2026-08-07 11:39:13 +08:00
1 parent 1ac1b75f6d
commit dd5d74fa4f
14 files changed
+58 -13

No files matched your search

+6 -2
View File
@@ -6,6 +6,7 @@ import { isExplicitlyQuotedSqlIdentifier, quoteGaussDbJdbcIdentifier } from "@/l
export interface BuildTableSelectSqlOptions {
databaseType?: DatabaseType;
driverProfile?: string;
identifierQuote?: string;
schema?: string;
tableName: string;
@@ -50,8 +51,11 @@ function quoteCypherIdentifier(name: string): string {
return `\`${name.replace(/`/g, "``")}\``;
}
export function qualifiedTableName(options: Pick<BuildTableSelectSqlOptions, "databaseType" | "identifierQuote" | "schema" | "tableName" | "catalog" | "database">): string {
const { databaseType, identifierQuote, schema, tableName, catalog, database } = options;
export function qualifiedTableName(options: Pick<BuildTableSelectSqlOptions, "databaseType" | "driverProfile" | "identifierQuote" | "schema" | "tableName" | "catalog" | "database">): string {
const { databaseType, driverProfile, identifierQuote, schema, tableName, catalog, database } = options;
if (databaseType === "informix" && driverProfile?.trim().toLowerCase() === "gbase8s") {
return quoteTableDataIdentifier(databaseType, tableName, identifierQuote);
}
// Doris / StarRocks multi-catalog: address external-catalog tables with the
// 3-part `catalog.database.table` form, which the engines accept directly.
if (catalog && catalog !== "internal" && (databaseType === "doris" || databaseType === "starrocks")) {