mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 16:36:00 +00:00
runscript WIP
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
<script context='module'>
|
||||
export function saveScriptToDatabase({ conid, database }, sql, syncModel = true) {
|
||||
await apiCall('database-connections/run-script', {
|
||||
conid,
|
||||
database,
|
||||
sql,
|
||||
});
|
||||
|
||||
const { errorMessage } = resp || {};
|
||||
if (errorMessage) {
|
||||
showModal(ErrorMessageModal, { title: 'Error when executing script', message: errorMessage });
|
||||
} else {
|
||||
showSnackbarSuccess('Saved to database');
|
||||
if (syncModel) apiCall('database-connections/sync-model', { conid, database });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import _, { startsWith } from 'lodash';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
Reference in New Issue
Block a user