Skip to content

Commit

Permalink
misc context | cache fixes (#1641)
Browse files Browse the repository at this point in the history
  • Loading branch information
lolopinto authored Sep 7, 2023
1 parent df2d00c commit 13e2c7b
Show file tree
Hide file tree
Showing 14 changed files with 289 additions and 256 deletions.
6 changes: 4 additions & 2 deletions ts/src/action/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ export class EdgeOperation implements DataOperation {
): Promise<void> {
const params = this.getDeleteRowParams(edgeData, edge, context);
if (params.op === SQLStatementOperation.Delete) {
return deleteRows(q, params.options, params.clause);
return deleteRows(q, { ...params.options, context }, params.clause);
} else {
if (params.op !== SQLStatementOperation.Update) {
throw new Error(`invalid operation ${params.op}`);
Expand All @@ -526,6 +526,7 @@ export class EdgeOperation implements DataOperation {
whereClause: params.clause,
fields: params.updateData!,
fieldsToLog: params.updateData!,
context,
});
}
}
Expand All @@ -538,7 +539,7 @@ export class EdgeOperation implements DataOperation {
): void {
const params = this.getDeleteRowParams(edgeData, edge, context);
if (params.op === SQLStatementOperation.Delete) {
return deleteRowsSync(q, params.options, params.clause);
return deleteRowsSync(q, { ...params.options, context }, params.clause);
} else {
if (params.op !== SQLStatementOperation.Update) {
throw new Error(`invalid operation ${params.op}`);
Expand All @@ -547,6 +548,7 @@ export class EdgeOperation implements DataOperation {
tableName: params.options.tableName,
whereClause: params.clause,
fields: params.updateData!,
context,
});
}
}
Expand Down
Loading

0 comments on commit 13e2c7b

Please sign in to comment.