(node: RootOperationNode, proceed: ProceedKyselyQueryFunction)
| 66 | } |
| 67 | |
| 68 | async handle(node: RootOperationNode, proceed: ProceedKyselyQueryFunction) { |
| 69 | if (DeleteQueryNode.is(node)) { |
| 70 | const converted = this.tryConvertDeleteToUpdate(node); |
| 71 | if (converted) { |
| 72 | // The rewritten UPDATE still flows through `transformUpdateQuery` so the |
| 73 | // soft-delete filter is added and already-soft-deleted rows aren't re-touched. |
| 74 | return proceed(this.transformNode(converted)); |
| 75 | } |
| 76 | // Not a soft-delete target: let the delete (and any DB-level cascade) proceed naturally. |
| 77 | } |
| 78 | return proceed(this.transformNode(node)); |
| 79 | } |
| 80 | |
| 81 | // Inject `<deletedAt> IS NULL` for soft-delete tables in the FROM clause. |
| 82 | protected override transformSelectQuery(node: SelectQueryNode): SelectQueryNode { |
no test coverage detected