mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 18:06:01 +00:00
mongo changeset WIP
This commit is contained in:
@@ -39,7 +39,7 @@ export default class ChangeSetGrider extends Grider {
|
||||
) {
|
||||
super();
|
||||
this.changeSet = changeSetState && changeSetState.value;
|
||||
this.insertedRows = getChangeSetInsertedRows(this.changeSet, display?.baseTable);
|
||||
this.insertedRows = getChangeSetInsertedRows(this.changeSet, display?.baseTableOrCollection);
|
||||
this.setChangeSet = value => dispatchChangeSet({ type: 'set', value });
|
||||
this.rowCacheIndexes = new Set();
|
||||
this.rowDataCache = {};
|
||||
@@ -47,6 +47,8 @@ export default class ChangeSetGrider extends Grider {
|
||||
this.rowDefinitionsCache = {};
|
||||
this.batchChangeSet = null;
|
||||
this.compiledMacroFunc = compileMacroFunction(macro, this._errors);
|
||||
|
||||
console.log('changeSet', this.changeSet);
|
||||
}
|
||||
|
||||
get errors() {
|
||||
@@ -110,7 +112,7 @@ export default class ChangeSetGrider extends Grider {
|
||||
}
|
||||
|
||||
get canInsert() {
|
||||
return !!this.display.baseTable;
|
||||
return !!this.display.baseTableOrCollection;
|
||||
}
|
||||
|
||||
getRowData(index: number) {
|
||||
@@ -157,7 +159,7 @@ export default class ChangeSetGrider extends Grider {
|
||||
|
||||
insertRow(): number {
|
||||
const res = this.rowCountInUpdate;
|
||||
this.applyModification(chs => changeSetInsertNewRow(chs, this.display.baseTable));
|
||||
this.applyModification(chs => changeSetInsertNewRow(chs, this.display.baseTableOrCollection));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -98,9 +98,10 @@
|
||||
|
||||
<style>
|
||||
.toolbar {
|
||||
background: var(--theme-bg-3);
|
||||
background: var(--theme-bg-1);
|
||||
display: flex;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
border-top: 2px solid var(--theme-border);
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user