mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
fix: error on export schema
This commit is contained in:
@ -7,6 +7,12 @@ export interface TableParams {
|
|||||||
|
|
||||||
export interface ExportOptions {
|
export interface ExportOptions {
|
||||||
schema: string;
|
schema: string;
|
||||||
|
tables: {
|
||||||
|
table: string;
|
||||||
|
includeStructure: boolean;
|
||||||
|
includeContent: boolean;
|
||||||
|
includeDropStatement: boolean;
|
||||||
|
}[];
|
||||||
includes: {[key: string]: boolean};
|
includes: {[key: string]: boolean};
|
||||||
outputFormat: 'sql' | 'sql.zip';
|
outputFormat: 'sql' | 'sql.zip';
|
||||||
outputFile: string;
|
outputFile: string;
|
||||||
|
@ -269,8 +269,8 @@ import * as moment from 'moment';
|
|||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { SchemaInfos } from 'common/interfaces/antares';
|
import { ClientCode, SchemaInfos } from 'common/interfaces/antares';
|
||||||
import { ExportOptions, ExportState, TableParams } from 'common/interfaces/exporter';
|
import { ExportOptions, ExportState } from 'common/interfaces/exporter';
|
||||||
import { useNotificationsStore } from '@/stores/notifications';
|
import { useNotificationsStore } from '@/stores/notifications';
|
||||||
import { useWorkspacesStore } from '@/stores/workspaces';
|
import { useWorkspacesStore } from '@/stores/workspaces';
|
||||||
import { useFocusTrap } from '@/composables/useFocusTrap';
|
import { useFocusTrap } from '@/composables/useFocusTrap';
|
||||||
@ -302,11 +302,15 @@ const isExporting = ref(false);
|
|||||||
const isRefreshing = ref(false);
|
const isRefreshing = ref(false);
|
||||||
const progressPercentage = ref(0);
|
const progressPercentage = ref(0);
|
||||||
const progressStatus = ref('');
|
const progressStatus = ref('');
|
||||||
const tables: Ref<TableParams[]> = ref([]);
|
const tables: Ref<{
|
||||||
const options: Ref<ExportOptions> = ref({
|
table: string;
|
||||||
|
includeStructure: boolean;
|
||||||
|
includeContent: boolean;
|
||||||
|
includeDropStatement: boolean;
|
||||||
|
}[]> = ref([]);
|
||||||
|
const options: Ref<Partial<ExportOptions>> = ref({
|
||||||
schema: props.selectedSchema,
|
schema: props.selectedSchema,
|
||||||
includes: {} as {[key: string]: boolean},
|
includes: {} as {[key: string]: boolean},
|
||||||
outputFile: '',
|
|
||||||
outputFormat: 'sql' as 'sql' | 'sql.zip',
|
outputFormat: 'sql' as 'sql' | 'sql.zip',
|
||||||
sqlInsertAfter: 250,
|
sqlInsertAfter: 250,
|
||||||
sqlInsertDivider: 'bytes' as 'bytes' | 'rows'
|
sqlInsertDivider: 'bytes' as 'bytes' | 'rows'
|
||||||
@ -353,7 +357,7 @@ const startExport = async () => {
|
|||||||
outputFile: dumpFilePath.value,
|
outputFile: dumpFilePath.value,
|
||||||
tables: [...tables.value],
|
tables: [...tables.value],
|
||||||
...options.value
|
...options.value
|
||||||
};
|
} as ExportOptions & { uid: string; type: ClientCode };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { status, response } = await Schema.export(params);
|
const { status, response } = await Schema.export(params);
|
||||||
|
Reference in New Issue
Block a user