used transaction for save table data

This commit is contained in:
Jan Prochazka
2023-02-05 19:17:46 +01:00
parent 722789ca01
commit e9a01a1ffd
6 changed files with 38 additions and 10 deletions

View File

@@ -121,7 +121,7 @@
const [changeSetStore, dispatchChangeSet] = createUndoReducer(createChangeSet());
async function handleConfirmSql(sql) {
const resp = await apiCall('database-connections/run-script', { conid, database, sql });
const resp = await apiCall('database-connections/run-script', { conid, database, sql, useTransaction: true });
const { errorMessage } = resp || {};
if (errorMessage) {
showModal(ErrorMessageModal, { title: 'Error when saving', message: errorMessage });