fix(kingbase): quote MySQL-compatible identifiers

This commit is contained in:
zipg authored and GitHub committed 2026-07-13 18:51:32 +08:00
1 parent 5ceca7fb3e
commit d1cce3ed1e
39 files changed
+373 -23

No files matched your search

@@ -89,7 +89,7 @@ import { formatElapsedSeconds } from "@/lib/common/elapsedTime";
import { dataGridCellDisplayText, dataGridCellEditorText } from "@/lib/dataGrid/dataGridCellCoercion";
import { createColumnDrafts } from "@/lib/table/tableStructureEditorState";
import type { BuildSingleColumnAlterSqlOptions } from "@/lib/table/tableStructureEditorSql";
import { buildTableSelectSql, quoteTableIdentifier } from "@/lib/table/tableSelectSql";
import { buildTableSelectSql, quoteTableDataIdentifier } from "@/lib/table/tableSelectSql";
import { uuid } from "@/lib/common/utils";
import { compactHeaderColumnType, resolveHeaderColumnType } from "@/lib/dataGrid/dataGridColumnType";
import {
@@ -3958,6 +3958,7 @@ async function buildCurrentCountTarget(): Promise<{ sql: string; schema?: string
if (props.tableMeta) {
const sql = await buildDataGridCountSql({
databaseType: props.databaseType,
identifierQuote: connectionStore.connectionIdentifierQuote?.(props.connectionId),
catalog: props.tableMeta.catalog,
schema: props.tableMeta.schema,
tableName: props.tableMeta.tableName,
@@ -5612,6 +5613,7 @@ async function applyOrderBySearch() {
if (!tableMeta) return;
const sql = await buildTableSelectSql({
databaseType: resolvedDatabaseType.value,
identifierQuote: connectionStore.connectionIdentifierQuote?.(props.connectionId),
catalog: tableMeta.catalog,
schema: tableMeta.schema,
tableName: tableMeta.tableName,
@@ -5644,6 +5646,7 @@ async function applyWhereFilter() {
if (!tableMeta) return;
const sql = await buildTableSelectSql({
databaseType: resolvedDatabaseType.value,
identifierQuote: connectionStore.connectionIdentifierQuote?.(props.connectionId),
catalog: tableMeta.catalog,
schema: tableMeta.schema,
tableName: tableMeta.tableName,
@@ -5753,7 +5756,7 @@ function columnTypeCacheSignature(): string {
watch(() => [props.result.columns.join("\u0000"), columnFormatterSignatures.value.join("\u0000"), columnTypeCacheSignature()], clearCellFormatCache);
function quoteIdent(name: string): string {
return quoteTableIdentifier(props.databaseType, name);
return quoteTableDataIdentifier(props.databaseType, name, connectionStore.connectionIdentifierQuote?.(props.connectionId));
}
function queryColumnRef(name: string): string {