Operations that cross every boundary.
Vadyl does not stop at SQL joins. The OperationPlanner builds a DAG across entities and providers, executes independent tiers in parallel, fans out reads where joins can't land natively, hashes results in memory, coalesces redundant mutations, and rolls back through saga compensation when anything fails.
const result = await VadylOperation .read(Customer).where(({tier: "enterprise"})) // Postgres .join(Order).on("customerId") // Mongo — fan-out .join(Inventory).on("sku") // Redis .aggregate("region", "sum(total)") // in-memory .execute();
Operations as graphs, not sequences.
OperationPlanner classifies every step (Read / Validation / Create / Update / Delete / LinkMutation / Schema / Compensation), wires dependency edges, and submits the DAG to the ExecutionEngine. Independent tiers run in parallel. Dependent steps wait. Failures trigger compensation.
Multi-entity, multi-provider
Read a customer in Postgres, fetch their orders from Mongo, look up SKU pricing in Redis, materialize an aggregate — one call, one plan, one transactional envelope.
Fan-out reads
When a join cannot land natively (cross-provider, cross-storage-model), Vadyl issues separate reads, materializes results into typed DataTables, and hash-joins in memory — no manual orchestration.
Parallel tier execution
Kahn-topological sort. Every tier whose dependencies are satisfied runs concurrently — semaphore-bounded, retry-aware, transaction-lifecycle-aware.
Operation coalescing
OperationCoalescer deduplicates redundant same-provider, same-entity mutations within a tier. Capability-gated by SupportsMultiRowInsert / SupportsMultiRowUpdate.
Read plan compilation
ReadPlanCompiler builds a CanonicalReadPlan from entity metadata. Deterministic, no dynamic plan rewrites — same inputs, same plan, every time.
AstSemanticLowering
Pre-rendering normalization: Cmp(Eq, x, null) → IsNull(x). Applied at every plan boundary so renderers never see ambiguous null comparisons.
Typed correlation keys
Cross-provider hash joins use TypedCorrelationKey — preserves CLR value types (int / long / Guid / string) for correct identity. No string-serialized keys, no separator collisions.
Per-step retry classification
OperationNode.RetryClassification (Read / IdempotentWrite / NonIdempotentWrite). The ExecutionEngine retries reads aggressively, idempotent writes carefully, non-idempotent writes once.
Inline COUNT batching
List reads with IncludeTotalCount batch the COUNT(*) into the same provider round-trip — single trip, no second query, no double-pagination drift.
Cascading writes, relation-aware traversal, all in one operation.
A VadylOperation can create a parent entity, attach children, link associative entities, validate cross-relation invariants, and trigger downstream events — all under one transactional envelope where the providers support it, or under one saga where they don't.
Cascade modes
OrphanDelete · SetNull · SetDefault · Restrict — declared on the relation, applied automatically on cascade traversal.
Composition realizations honor LifecycleCoupling and InheritsParentAccess.
Expansion budgets
Configurable expansion depth, traversal budget, cycle detection. EntityModelResolver fails loud on missing child models — no silent degradation.
Default MaxRelationExpansionDepth caps unbounded recursion at the canonical default.
Concurrency tokens
Optimistic CAS via [ConcurrencyToken] / [RowVersion]. The pipeline emits real UPDATE … SET token=NEW WHERE … AND token=OLD.
If-Match HTTP header path supported on every entity PUT for HTTP-level CAS.
Composite keys
Multi-column primary keys, foreign keys, alternate keys — handled identically through the entity model. No "Id" assumption anywhere in the pipeline.
BuildCompositeKey escapes pipe separators — value collisions cannot corrupt correlation.
Topologically sorted, parallel by tier
In-memory, typed, deterministic
Inline with paginated reads
Provider compiles, never receives raw SQL
Stop hand-rolling cross-database orchestration.
Build the operation. Vadyl plans the DAG, executes the tiers, fans out the reads, hashes the joins, coalesces the writes, retries the right steps.