pub struct QueryBindings {Show 25 fields
pub parameters: Arc<HashMap<String, Value>>,
pub session_variables: Arc<HashMap<String, Value>>,
pub parameter_frame: Option<ParameterFrame>,
pub space_name: Option<String>,
pub storage: Option<Arc<RwLock<dyn QueryStorage>>>,
pub bound_snapshot: Option<SnapshotHandle>,
pub memory_budget: MemoryBudget,
pub max_workers: usize,
pub chunk_size: usize,
pub max_buffered_chunks: usize,
pub query_id: u64,
pub cancel_token: Option<CancelToken>,
pub query_text: Option<String>,
pub session_id: Option<String>,
pub user_name: Option<String>,
pub transaction: TransactionScope,
pub shared_scheduler: Option<Arc<SharedScheduler>>,
pub partition_count: usize,
pub arena: Option<Arc<Mutex<Arena>>>,
pub feedback_history: Option<Arc<QueryFeedbackHistory>>,
pub columnar_policy: Option<Arc<ColumnarPolicy>>,
pub macro_manager: Option<Arc<MacroManager>>,
pub type_alias_manager: Option<Arc<TypeAliasManager>>,
pub sequence_manager: Option<Arc<SequenceManager>>,
pub search: SearchContext,
}Expand description
Per-execution bindings that parameterize a PhysicalPlan.
Unlike the plan (immutable, cacheable), QueryBindings carries data that
changes per invocation: parameter values, storage handles, transaction
scope, memory budget, and delivery preferences.
Multiple concurrent executions of the same plan each have their own
QueryBindings, ensuring no mutable state is shared across instances.
carries a ParameterFrame for slot-based parameter access at
execution time, built during validation from the plan’s parameter schema.
Fields§
§parameters: Arc<HashMap<String, Value>>Prepared-statement parameter values (name → value map for validation).
session_variables: Arc<HashMap<String, Value>>Session variable snapshot (name → value map), captured once per
statement at the API layer and resolved by Expression::SessionVariable.
parameter_frame: Option<ParameterFrame>slot-indexed parameter frame for hot-path access.
space_name: Option<String>Target space name.
storage: Option<Arc<RwLock<dyn QueryStorage>>>Storage client for this execution.
bound_snapshot: Option<SnapshotHandle>Snapshot handle pinned by the bound storage (storage boundary).
Populated by the pipeline when the per-query storage is bound to a
read/auto-commit operation context. None for unbound storage.
memory_budget: MemoryBudgetPer-query memory budget.
max_workers: usizeMaximum intra-query worker threads (1 = serial only).
chunk_size: usizeRows per output chunk.
max_buffered_chunks: usizeMax buffered chunks per partition channel before back-pressure.
query_id: u64Server-assigned query ID (for KILL QUERY / metrics).
cancel_token: Option<CancelToken>Request-scoped cancellation token.
When present it is shared with the query registry and the execution
runtime so QueryContext::mark_killed, KILL QUERY, and runtime cancel
all flip the same underlying state.
query_text: Option<String>Query text for diagnostics and logging.
session_id: Option<String>Session ID for the executing session.
user_name: Option<String>User name for the executing session.
transaction: TransactionScopeTransaction scope for this execution.
Engine-level shared scheduler. When set, all queries share the same worker pool instead of creating per-query threads.
partition_count: usizeNumber of partitions for partitioned execution. 0 = non-partitioned.
arena: Option<Arc<Mutex<Arena>>>Optional thread-safe bumpalo arena for executor temporary allocations.
feedback_history: Option<Arc<QueryFeedbackHistory>>Shared query feedback history for collecting execution statistics.
When set, the execution instance records estimated-vs-actual operator feedback here after execution completes (stats feedback loop). Injected by the pipeline from the optimizer engine.
columnar_policy: Option<Arc<ColumnarPolicy>>Shared cross-query policy for the typed columnar chunk layout.
When set, the per-query columnar hit/miss counts are merged back into the policy when the query finishes (columnar auto-detection). Injected by the pipeline from the optimizer engine.
macro_manager: Option<Arc<MacroManager>>Macro catalog manager (user-defined macros), shared engine-wide.
type_alias_manager: Option<Arc<TypeAliasManager>>Type-alias catalog manager (user-defined types), shared engine-wide.
sequence_manager: Option<Arc<SequenceManager>>Sequence catalog manager (named sequences), shared engine-wide.
search: SearchContextImplementations§
Source§impl QueryBindings
impl QueryBindings
Sourcepub fn from_context(
context: &ExecutionContext,
transaction: TransactionScope,
) -> Self
pub fn from_context( context: &ExecutionContext, transaction: TransactionScope, ) -> Self
Build bindings from an [ExecutionContext] and a transaction scope.
Sourcepub fn build_parameter_frame(&mut self, schema: &ParameterSchema)
pub fn build_parameter_frame(&mut self, schema: &ParameterSchema)
Build a ParameterFrame from the plan’s parameter schema and the
binding values. Called after validation during materialization.
produces a slot-indexed frame that operators can read without string-based lookup.
Trait Implementations§
Source§impl Clone for QueryBindings
impl Clone for QueryBindings
Auto Trait Implementations§
impl !RefUnwindSafe for QueryBindings
impl !UnwindSafe for QueryBindings
impl Freeze for QueryBindings
impl Send for QueryBindings
impl Sync for QueryBindings
impl Unpin for QueryBindings
impl UnsafeUnpin for QueryBindings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.