3 files changed
+58
-3
No files matched your search
@@ -6,3 +6,13 @@ export function buildSelectedTablesPayload(allTables: string[], selectedTables:
|
||||
const selected = new Set(selectedTables);
|
||||
return allTables.filter((table) => selected.has(table));
|
||||
}
|
||||
|
||||
export function isDatabaseExportTableSelectionValid(options: {
|
||||
allTableCount: number;
|
||||
selectedTableCount: number;
|
||||
includeStructure: boolean;
|
||||
includeData: boolean;
|
||||
}): boolean {
|
||||
if (!options.includeStructure && !options.includeData) return true;
|
||||
return options.allTableCount === 0 || options.selectedTableCount > 0;
|
||||
}
|
||||
Reference in new issue
Block a user