Skip to main content

Module executor

Module executor 

Source
Expand description

Async migration executor.

Runs an ExecutionPlan produced by the planner over a Database, committing each step in its own transaction. The executor is runtime-agnostic: the caller (PyMigrationRunner in Phase 3) drives it by block_on-ing the returned future on the shared Arc<Runtime>.

§Per-step commit contract

TypeDB forbids multiple define blocks per transaction. Each ExecutionStep is executed in its own transaction and committed independently. When a step fails, earlier committed steps in the same migration are not rolled back (there is no cross-step atomicity). This matches the current Python per-statement-commit behavior and is the documented contract for this boundary.

Structs§

MigrationResult
Result of executing a single migration (one entry per attempted migration).

Functions§

execute_migration
Execute a single MigrationExecution.
execute_plan
Execute a ExecutionPlan against db.
execute_plan_with_run_log
Execute a plan while writing one DB-backed run-log row per attempted migration.