mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 07:16:01 +00:00
revert row changes, delete - for all selected rows
This commit is contained in:
@@ -194,7 +194,9 @@ export function changeSetToSql(changeSet: ChangeSet): Command[] {
|
||||
}
|
||||
|
||||
export function revertChangeSetRowChanges(changeSet: ChangeSet, definition: ChangeSetRowDefinition): ChangeSet {
|
||||
console.log('definition', definition)
|
||||
const [field, item] = findExistingChangeSetItem(changeSet, definition);
|
||||
console.log('field, item', field, item)
|
||||
if (item)
|
||||
return {
|
||||
...changeSet,
|
||||
|
||||
@@ -371,21 +371,19 @@ export abstract class GridDisplay {
|
||||
if (!this.baseTable) return null;
|
||||
if (this.baseTable.pureName != col.pureName || this.baseTable.schemaName != col.schemaName) return null;
|
||||
return {
|
||||
pureName: col.pureName,
|
||||
schemaName: col.schemaName,
|
||||
...this.getChangeSetRow(row, insertedRowIndex),
|
||||
uniqueName: uniqueName,
|
||||
columnName: col.columnName,
|
||||
insertedRowIndex,
|
||||
condition: insertedRowIndex == null ? this.getChangeSetCondition(row) : null,
|
||||
};
|
||||
}
|
||||
|
||||
getChangeSetRow(row): ChangeSetRowDefinition {
|
||||
getChangeSetRow(row, insertedRowIndex): ChangeSetRowDefinition {
|
||||
if (!this.baseTable) return null;
|
||||
return {
|
||||
pureName: this.baseTable.pureName,
|
||||
schemaName: this.baseTable.schemaName,
|
||||
condition: this.getChangeSetCondition(row),
|
||||
insertedRowIndex,
|
||||
condition: insertedRowIndex == null ? this.getChangeSetCondition(row) : null,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user