mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 13:46:00 +00:00
mongo update script preview
This commit is contained in:
@@ -118,11 +118,17 @@
|
||||
|
||||
export function save() {
|
||||
const json = $changeSetStore?.value;
|
||||
showModal(ConfirmNoSqlModal, {
|
||||
json,
|
||||
onConfirm: () => handleConfirmChange(json),
|
||||
engine: display.engine,
|
||||
});
|
||||
const driver = findEngineDriver($connection, $extensions);
|
||||
const script = driver.getCollectionUpdateScript ? driver.getCollectionUpdateScript(json) : null;
|
||||
if (script) {
|
||||
showModal(ConfirmNoSqlModal, {
|
||||
script,
|
||||
onConfirm: () => handleConfirmChange(json),
|
||||
engine: display.engine,
|
||||
});
|
||||
} else {
|
||||
handleConfirmChange(json);
|
||||
}
|
||||
}
|
||||
|
||||
export function addJsonDocument() {
|
||||
|
||||
Reference in New Issue
Block a user