feat(export): honor exclude-primary-keys in SQL script exports
This commit is contained in:
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> {
|
||||
|
||||
Reference in new issue
Block a user