pub struct OwnedBindingCall(/* private fields */);Expand description
A function-call view of SQL’s mutable scalar owner. All observations borrow the original IR; edits transfer its constructor reservations with the corresponding fields.
Implementations§
Source§impl OwnedBindingCall
impl OwnedBindingCall
pub fn new( expression: OwnedScalarExpr, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>
pub fn into_expression(self) -> OwnedScalarExpr
pub fn name(&self) -> &str
pub fn binding(&self) -> Option<&FunctionBinding>
pub fn arguments(&self) -> &[ScalarExpr]
pub fn order_by(&self) -> &[ScalarOrder]
pub fn filter(&self) -> Option<&ScalarExpr>
pub fn is_distinct(&self) -> bool
pub fn map_argument( self, index: usize, control: &ProductionControl<'_>, rewrite: impl FnOnce(OwnedScalarExpr) -> Result<OwnedScalarExpr, SQLError>, ) -> Result<Self, SQLError>
Sourcepub fn take_argument(
self,
index: usize,
control: &ProductionControl<'_>,
) -> Result<(Self, OwnedScalarExpr), SQLError>
pub fn take_argument( self, index: usize, control: &ProductionControl<'_>, ) -> Result<(Self, OwnedScalarExpr), SQLError>
Move a supplied argument into an independent owner, leaving an inline NULL in its original slot until the call publishes its replacement argument vector.
pub fn swap_arguments( self, left: usize, right: usize, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>
pub fn map_arguments( self, control: &ProductionControl<'_>, rewrite: impl FnMut(usize, OwnedScalarExpr) -> Result<OwnedScalarExpr, SQLError>, ) -> Result<Self, SQLError>
pub fn map_order( self, index: usize, control: &ProductionControl<'_>, rewrite: impl FnOnce(OwnedScalarExpr) -> Result<OwnedScalarExpr, SQLError>, ) -> Result<Self, SQLError>
pub fn map_filter( self, control: &ProductionControl<'_>, rewrite: impl FnOnce(OwnedScalarExpr) -> Result<OwnedScalarExpr, SQLError>, ) -> Result<Self, SQLError>
pub fn replace_binding( self, binding: Option<Produced<FunctionBinding>>, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>
Sourcepub fn rebind(
self,
binding: Produced<FunctionBinding>,
control: &ProductionControl<'_>,
) -> Result<Self, SQLError>
pub fn rebind( self, binding: Produced<FunctionBinding>, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>
Install the selected binding while preserving a previously selected input collation when the replacement does not choose one.
pub fn set_dispatch( self, dispatch: Option<FunctionDispatch>, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>
pub fn replace_metadata( self, name: Produced<String>, binding: Option<Produced<FunctionBinding>>, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>
pub fn take_arguments( self, control: &ProductionControl<'_>, ) -> Result<(Self, OwnedScalarExpr), SQLError>
pub fn replace_arguments( self, arguments: OwnedScalarExpr, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>
Methods from Deref<Target = ScalarExpr>§
Sourcepub fn has_same_syntax_with_control(
&self,
other: &Self,
control: &ProductionControl<'_>,
) -> Result<bool, SQLError>
pub fn has_same_syntax_with_control( &self, other: &Self, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>
Compare exactly the same syntax and metadata as PartialEq, with cancellation between children and admission for any independent retained-value reads.
Sourcepub fn visit(&self, visitor: &mut impl FnMut(&Self))
pub fn visit(&self, visitor: &mut impl FnMut(&Self))
Visit this expression and every nested scalar expression in pre-order.
Sourcepub fn try_visit<'a, E>(
&'a self,
visitor: &mut impl FnMut(&'a Self) -> Result<bool, E>,
) -> Result<(), E>
pub fn try_visit<'a, E>( &'a self, visitor: &mut impl FnMut(&'a Self) -> Result<bool, E>, ) -> Result<(), E>
Visit in pre-order, skipping a subtree when the visitor returns false and stopping immediately on its first error.
Sourcepub fn collect_columns(&self, output: &mut BTreeSet<String>) -> bool
pub fn collect_columns(&self, output: &mut BTreeSet<String>) -> bool
Collect every column needed to evaluate this expression. Returns false when evaluation needs row shape or a relational child that a projected field scan cannot provide.
Sourcepub fn try_visit_columns<'a, E>(
&'a self,
visitor: &mut impl FnMut(&'a str) -> Result<(), E>,
) -> Result<bool, E>
pub fn try_visit_columns<'a, E>( &'a self, visitor: &mut impl FnMut(&'a str) -> Result<(), E>, ) -> Result<bool, E>
Borrow referenced column names in evaluation-tree order, stopping at the first visitor failure or unprojectable expression. Qualified references yield their column component, matching collect_columns; repeated references remain visible to the visitor. No name or result container is allocated by this traversal.
pub fn contains_window(&self) -> bool
pub fn contains_subquery(&self) -> bool
pub fn contains_parameter(&self) -> bool
pub fn contains_aggregate(&self, is_aggregate: &dyn Fn(&str) -> bool) -> bool
Sourcepub fn reference_qualifier(&self) -> Option<&str>
pub fn reference_qualifier(&self) -> Option<&str>
Relation qualifier of a named attribute or qualified wildcard.
Sourcepub fn reference_position(&self) -> Option<u32>
pub fn reference_position(&self) -> Option<u32>
Original one-based character position of a named SQL reference.
Sourcepub fn clone_with_control(
&self,
control: &ProductionControl<'_>,
) -> Result<Produced<Self>, CatalogRetentionError>
pub fn clone_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<Self>, CatalogRetentionError>
Copy a scalar tree using admitted constructor frames instead of recursive scalar calls. The immutable result combines only destination reservations; temporary frame storage is released before return.
Sourcepub fn copy_for_rewrite(
&self,
control: &ProductionControl<'_>,
) -> Result<OwnedScalarExpr, CatalogRetentionError>
pub fn copy_for_rewrite( &self, control: &ProductionControl<'_>, ) -> Result<OwnedScalarExpr, CatalogRetentionError>
Copy into a mutable scalar owner with independent direct and child reservations. Iterative constructors preserve field order, destination admission and query-arena identities in both ordinary and controlled modes.
Trait Implementations§
Source§impl Debug for OwnedBindingCall
impl Debug for OwnedBindingCall
Auto Trait Implementations§
impl !RefUnwindSafe for OwnedBindingCall
impl !UnwindSafe for OwnedBindingCall
impl Freeze for OwnedBindingCall
impl Send for OwnedBindingCall
impl Sync for OwnedBindingCall
impl Unpin for OwnedBindingCall
impl UnsafeUnpin for OwnedBindingCall
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<T> ErasedDestructor for Twhere
T: 'static,
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 more