fix(gbase8s): omit owner qualifier in table admin SQL

This commit is contained in:
New2Niu authored and GitHub committed 2026-09-14 14:52:13 +08:00
1 parent 6d866905b5
commit 1533064f1f
6 files changed
+37 -10

No files matched your search

@@ -19,6 +19,7 @@ import {
type VacuumTableSqlOptions,
} from "@/lib/database/dbAdminSql";
import { isSqlServerLinkedNode } from "@/lib/database/sqlServerLinkedServers";
import { connectionTableSqlSchema } from "@/lib/database/jdbcDialect";
import { isQueryTimeoutErrorMessage } from "@/lib/sql/queryError";
import { uuid } from "@/lib/common/utils";
import * as api from "@/lib/backend/api";
@@ -74,9 +75,10 @@ export function useSidebarTableMutationRuntime(options: SidebarTableMutationRunt
const supportsMysqlAutoIncrement = computed(() => activeNode.value.type === "table" && supportsNativeMysqlAutoIncrement(activeNode.value.connectionId ? connectionStore.getConfig(activeNode.value.connectionId) : undefined));
function tableAdminSqlOptions(optionsOverride?: { cascade?: boolean }): TableAdminSqlOptions {
const config = activeNode.value.connectionId ? connectionStore.getConfig(activeNode.value.connectionId) : undefined;
const result: TableAdminSqlOptions = {
databaseType: currentDatabaseType(),
schema: activeNode.value.schema,
schema: connectionTableSqlSchema(config, activeNode.value.schema),
tableName: activeNode.value.label,
// Cloud Spanner's two dialects quote differently, so admin SQL needs the quote the connected
// agent reported rather than the static per-type mapping.
@@ -87,9 +89,10 @@ export function useSidebarTableMutationRuntime(options: SidebarTableMutationRunt
}
function tableAdminSqlOptionsForNode(node: TreeNode, optionsOverride?: { cascade?: boolean }): TableAdminSqlOptions {
const config = node.connectionId ? connectionStore.getConfig(node.connectionId) : undefined;
const result: TableAdminSqlOptions = {
databaseType: databaseTypeForNode(node),
schema: node.schema,
schema: connectionTableSqlSchema(config, node.schema),
tableName: node.label,
identifierQuote: connectionStore.connectionIdentifierQuote?.(node.connectionId),
};