Skip to main content

RoutineOverloadContext

Struct RoutineOverloadContext 

Source
pub struct RoutineOverloadContext<'a> {
    pub catalog: &'a dyn RoutineOverloadCatalog,
}

Fields§

§catalog: &'a dyn RoutineOverloadCatalog

Implementations§

Source§

impl RoutineOverloadContext<'_>

Source

pub fn resolve_static_sql_function( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, ) -> Result<Option<Arc<SQLUserFunction>>, SQLError>

Source

pub fn resolve_static_sql_function_match( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, ) -> Result<Option<StaticFunctionMatch>, SQLError>

Source

pub fn resolve_table_function_overload_with_builtins( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, builtins: &[BuiltinFunctionOverload], ) -> Result<Option<ResolvedFunctionOverload>, SQLError>

Source

pub fn resolve_static_sql_routine_match( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, kind: RoutineCallKind, ) -> Result<Option<StaticFunctionMatch>, SQLError>

Trait Implementations§

Source§

impl FunctionTypeResolver for RoutineOverloadContext<'_>

Source§

fn has_untyped_function(&self, name: &str) -> bool

Return whether an external runtime callback claims this unbound function name without exposing a declared SQL return type. Such callbacks must retain dispatch precedence instead of being rebound to a same-named built-in overload.
Source§

fn resolve_type_name(&self, name: &str) -> Result<Option<ColumnType>, SQLError>

Resolve a catalog-owned SQL type name that is not represented by the built-in ColumnType::from_sql_name mapping, such as a domain.
Source§

fn resolve_function_type( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, ) -> Result<Option<ColumnType>, SQLError>

Source§

fn resolve_function_overload( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, ) -> Result<Option<ResolvedFunctionOverload>, SQLError>

Resolve a catalog-backed overload together with the stable binding needed to execute it after built-in and user-defined candidates have been ranked.
Source§

fn is_scalar_function_binding( &self, binding: &FunctionBinding, ) -> Result<bool, SQLError>

Return whether an exact catalog-selected binding can execute in a scalar expression. The conservative default prevents aggregate, procedure, and set-returning routines from being attached to ScalarExpr::Func.
Source§

fn resolve_function_overload_with_builtins( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, builtins: &[BuiltinFunctionOverload], ) -> Result<Option<ResolvedFunctionOverload>, SQLError>

Resolve catalog-backed routines and the supplied built-in overloads as one PostgreSQL candidate set. Implementations with catalog visibility should override this so search-path shadowing and unknown-category selection happen before a winner is chosen.
Source§

fn resolve_scalar_subquery_type( &self, _subquery: SubqueryId, _outer_schema: &RowSchema, _params: &[SQLParam], ) -> Result<Option<ColumnType>, SQLError>

Resolve the declared first-column type of a physical scalar-subquery slot when the owning execution context carries its plan arena.

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<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.