From 852e0ffe95ae0c1a8c235cad42ac4261bc4e160f Mon Sep 17 00:00:00 2001 From: Tobias Bora Date: Fri, 14 Jun 2024 02:48:01 +0200 Subject: [PATCH] Allow different name with import --- addons/dexie-export-import/README.md | 1 + addons/dexie-export-import/src/import.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/dexie-export-import/README.md b/addons/dexie-export-import/README.md index 885719ddf..88bf6bf38 100644 --- a/addons/dexie-export-import/README.md +++ b/addons/dexie-export-import/README.md @@ -115,6 +115,7 @@ export interface StaticImportOptions { chunkSizeBytes?: number; // Default: DEFAULT_KILOBYTES_PER_CHUNK ( 1MB ) filter?: (table: string, value: any, key?: any) => boolean; progressCallback?: (progress: ImportProgress) => boolean; + name?: string; } export interface ImportOptions extends StaticImportOptions { diff --git a/addons/dexie-export-import/src/import.ts b/addons/dexie-export-import/src/import.ts index 2fae19a2d..02cb8d609 100644 --- a/addons/dexie-export-import/src/import.ts +++ b/addons/dexie-export-import/src/import.ts @@ -10,6 +10,7 @@ export interface StaticImportOptions { filter?: (table: string, value: any, key?: any) => boolean; transform?: (table: string, value: any, key?: any) => ({value: any, key?: any}); progressCallback?: (progress: ImportProgress) => boolean; + name?: string; } export interface ImportOptions extends StaticImportOptions { @@ -42,7 +43,7 @@ export async function importDB(exportedData: Blob | JsonStream