Multi-dependency move queue. Tracks move_in/move_out operations per dependency index, with deduplication and redundancy elimination scoped per dependency.
Move-outs from any dependency are drained before move-ins from any dependency.
Summary
Functions
Enqueue a materializer payload for a specific dependency.
dep_view is the current view for this dependency, used for redundancy elimination.
Pop the next batch of operations. Returns move-out batches (any dep) before move-in batches.
Returns {batch, updated_queue} or nil if the queue is empty.
Types
@type batch() :: {batch_kind(), non_neg_integer(), [move_value()]}
@type batch_kind() :: :move_out | :move_in
@type t() :: %Electric.Shapes.Consumer.Subqueries.MoveQueue{ move_in: %{required(non_neg_integer()) => [move_value()]}, move_out: %{required(non_neg_integer()) => [move_value()]} }
Functions
Enqueue a materializer payload for a specific dependency.
dep_view is the current view for this dependency, used for redundancy elimination.
@spec length(t()) :: non_neg_integer()
@spec new() :: t()
Pop the next batch of operations. Returns move-out batches (any dep) before move-in batches.
Returns {batch, updated_queue} or nil if the queue is empty.