fix(dameng): wrap identity columns when pasting table data

This commit is contained in:
弈秋 authored and GitHub committed 2026-09-21 19:04:29 +08:00
1 parent be055a60cc
commit 0c6fc610cd
4 files changed
+58 -1

No files matched your search

@@ -334,6 +334,7 @@ export interface CopyTableDataSqlOptions {
columns?: string[];
postgresOverridingSystemValue?: boolean;
sqlserverIdentityInsert?: boolean;
damengIdentityInsert?: boolean;
normalizeNewTargetName?: boolean;
/** Quote character reported by the connected server, for types whose quote is not fixed by the
* database type alone (Cloud Spanner's two dialects differ). Mirrors `identifierQuote` on the
@@ -18,6 +18,7 @@ export interface TableDataCopyColumnOptions {
columns: string[];
postgresOverridingSystemValue: boolean;
sqlserverIdentityInsert: boolean;
damengIdentityInsert: boolean;
}
export interface TablePasteFeedback {
@@ -88,6 +89,7 @@ export function tableDataCopyColumnOptions(databaseType: DatabaseType | undefine
columns: writableColumns.map((column) => column.name),
postgresOverridingSystemValue: databaseType === "postgres" && writableColumns.some(isIdentityColumn),
sqlserverIdentityInsert: databaseType === "sqlserver" && writableColumns.some(isIdentityColumn),
damengIdentityInsert: databaseType === "dameng" && writableColumns.some(isIdentityColumn),
};
}