feat(export): honor exclude-primary-keys in SQL script exports

This commit is contained in:
高桥凉介 authored and GitHub committed 2026-09-17 14:13:36 +08:00
1 parent 137a1a4161
commit d17ce46626
16 files changed
+464 -68

No files matched your search

@@ -47,6 +47,8 @@ export interface BuildExportInsertStatementsOptions {
spatialColumns?: QueryResult["spatial_columns"];
spatialValues?: QueryResult["spatial_values"];
rows: QueryResult["rows"];
/** 生成 INSERT 时需要排除的列名(例如导出时不带主键),忽略大小写匹配。 */
excludeColumns?: string[];
batchSize?: number;
}
@@ -40,6 +40,7 @@ export interface FormatSqlInsertOptions {
spatialValues?: QueryResult["spatial_values"];
rows: ExportCellValue[][];
insertMode?: SqlInsertMode;
excludeColumns?: string[];
}
export function formatSqlInsert({ insertMode = "batch", ...options }: FormatSqlInsertOptions): Promise<string> {