mysql dumper POC

This commit is contained in:
Jan Prochazka
2022-04-15 20:12:40 +02:00
parent f78d37159e
commit 6c718981d6
11 changed files with 159 additions and 33 deletions

View File

@@ -86,6 +86,10 @@
});
};
const handleSqlDump = () => {
exportSqlDump(connection, name);
};
const handleShowDiagram = async () => {
const db = await getDatabaseInfo({
conid: connection._id,
@@ -200,8 +204,10 @@
driver?.databaseEngineTypes?.includes('sql') && { onClick: handleNewTable, text: 'New table' },
driver?.databaseEngineTypes?.includes('document') && { onClick: handleNewCollection, text: 'New collection' },
{ divider: true },
isSqlOrDoc && !connection.isReadOnly && { onClick: handleImport, text: 'Import' },
isSqlOrDoc && { onClick: handleExport, text: 'Export' },
isSqlOrDoc && !connection.isReadOnly && { onClick: handleImport, text: 'Import wizard' },
isSqlOrDoc && { onClick: handleExport, text: 'Export wizard' },
driver?.supportsDatabaseDump && { onClick: handleSqlDump, text: 'Backup/export SQL dump' },
{ divider: true },
isSqlOrDoc && { onClick: handleShowDiagram, text: 'Show diagram' },
isSqlOrDoc && { onClick: handleSqlGenerator, text: 'SQL Generator' },
isSqlOrDoc && { onClick: handleOpenJsonModel, text: 'Open model as JSON' },
@@ -267,6 +273,7 @@
import ConfirmSqlModal from '../modals/ConfirmSqlModal.svelte';
import { filterAppsForDatabase } from '../utility/appTools';
import newQuery from '../query/newQuery';
import { exportSqlDump } from '../utility/exportFileTools';
export let data;
export let passProps;