pub async fn execute_backfill(
db: &Database,
step: &ExecutionStep,
step_index: usize,
) -> Result<BackfillResult, MigrationError>Expand description
Execute a backfill ExecutionStep against db, deriving and returning
matched/inserted/skipped counts.
§Execution sequence
- Run a
Readcount query over the guarded match clause (the insert-if-absent predicate — rows that will be inserted). - Run a
Readcount query over the unguarded match clause (all candidate rows, including those already having the destination). - Run the forward TypeQL under a
Writetransaction and commit.
Steps 1 and 2 run before the write so the counts reflect the pre-write state.
§Invariant 2
Both count queries are derived from step.forward by string manipulation of
the carried match clause. No OperationSpec is inspected here.