Skip to main content

OwnedBindingCall

Struct OwnedBindingCall 

Source
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

Source

pub fn new( expression: OwnedScalarExpr, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>

Source

pub fn into_expression(self) -> OwnedScalarExpr

Source

pub fn name(&self) -> &str

Source

pub fn binding(&self) -> Option<&FunctionBinding>

Source

pub fn arguments(&self) -> &[ScalarExpr]

Source

pub fn order_by(&self) -> &[ScalarOrder]

Source

pub fn filter(&self) -> Option<&ScalarExpr>

Source

pub fn is_distinct(&self) -> bool

Source

pub fn map_argument( self, index: usize, control: &ProductionControl<'_>, rewrite: impl FnOnce(OwnedScalarExpr) -> Result<OwnedScalarExpr, SQLError>, ) -> Result<Self, SQLError>

Source

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.

Source

pub fn swap_arguments( self, left: usize, right: usize, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>

Source

pub fn map_arguments( self, control: &ProductionControl<'_>, rewrite: impl FnMut(usize, OwnedScalarExpr) -> Result<OwnedScalarExpr, SQLError>, ) -> Result<Self, SQLError>

Source

pub fn map_order( self, index: usize, control: &ProductionControl<'_>, rewrite: impl FnOnce(OwnedScalarExpr) -> Result<OwnedScalarExpr, SQLError>, ) -> Result<Self, SQLError>

Source

pub fn map_filter( self, control: &ProductionControl<'_>, rewrite: impl FnOnce(OwnedScalarExpr) -> Result<OwnedScalarExpr, SQLError>, ) -> Result<Self, SQLError>

Source

pub fn replace_binding( self, binding: Option<Produced<FunctionBinding>>, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>

Source

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.

Source

pub fn set_dispatch( self, dispatch: Option<FunctionDispatch>, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>

Source

pub fn replace_metadata( self, name: Produced<String>, binding: Option<Produced<FunctionBinding>>, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>

Source

pub fn take_arguments( self, control: &ProductionControl<'_>, ) -> Result<(Self, OwnedScalarExpr), SQLError>

Source

pub fn replace_arguments( self, arguments: OwnedScalarExpr, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>

Methods from Deref<Target = ScalarExpr>§

Source

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.

Source

pub fn visit(&self, visitor: &mut impl FnMut(&Self))

Visit this expression and every nested scalar expression in pre-order.

Source

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.

Source

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.

Source

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.

Source

pub fn contains_window(&self) -> bool

Source

pub fn contains_subquery(&self) -> bool

Source

pub fn contains_parameter(&self) -> bool

Source

pub fn contains_aggregate(&self, is_aggregate: &dyn Fn(&str) -> bool) -> bool

Source

pub fn reference_qualifier(&self) -> Option<&str>

Relation qualifier of a named attribute or qualified wildcard.

Source

pub fn reference_position(&self) -> Option<u32>

Original one-based character position of a named SQL reference.

Source

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.

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for OwnedBindingCall

Source§

type Target = ScalarExpr

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.