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_routine_match_with_control( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, kind: RoutineCallKind, control: &ProductionControl<'_>, ) -> Result<Option<OwnedStaticFunctionMatch>, SQLError>

Source§

impl RoutineOverloadContext<'_>

Source

pub fn resolve_static_sql_function_binding_with_control( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, control: &ProductionControl<'_>, ) -> Result<Option<Produced<FunctionBinding>>, SQLError>

Static table binding checks the selected routine without resolving a scalar output type.

Source

pub fn resolve_table_function_overload_with_builtins_and_control( &self, name: &str, binding: Option<&FunctionBinding>, call: RoutineCallDescriptor<'_>, builtins: &[BuiltinFunctionOverload], control: &ProductionControl<'_>, ) -> Result<Option<Produced<ResolvedFunctionOverload>>, SQLError>

Source§

impl RoutineOverloadContext<'_>

Source

pub fn resolve_bound_function_overload_with_control( &self, name: &str, binding: &FunctionBinding, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, control: &ProductionControl<'_>, ) -> Result<Produced<ResolvedFunctionOverload>, SQLError>

Revalidate the selected identity and invocation, then construct exactly the binding and result type the caller retains.

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<'a> Clone for RoutineOverloadContext<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for RoutineOverloadContext<'a>

Source§

impl FunctionTypeResolver for RoutineOverloadContext<'_>

Source§

fn format_type_name(&self, ty: &ColumnType) -> Result<String, SQLError>

Format a selected type using the binding catalog’s namespace visibility.
Source§

fn format_type_name_with_control( &self, ty: &ColumnType, control: &ProductionControl<'_>, ) -> Result<Produced<String>, SQLError>

Retain a custom resolver’s result in the caller’s allowance. Native catalogs override this method to admit their own construction rather than copy an external result.
Source§

fn composite_types(&self) -> Option<&dyn CompositeTypeCatalog>

Composite type attributes of the binding catalog, which type field selections and row coercions.
Source§

fn has_untyped_function_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Observe an external callback’s dispatch precedence while retaining invoking cancellation. Native catalogs override this callback to admit any name normalization before allocation.
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_type_name_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>, SQLError>

The default adapts an external catalog’s owned result; project-owned catalogs admit their result in the producing implementation.
Source§

fn require_type_usage(&self, ty: &ColumnType) -> Result<(), SQLError>

Require the current user’s USAGE privilege on a type that a relation column, domain or routine declares, as object_aclcheck(TypeRelationId, ..., ACL_USAGE) and aclcheck_error_type require it; see crate::catalog::security::type_inquiry::usage_governing_type. A resolver without roles and type privileges has nothing to deny.
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_type_with_control( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>, SQLError>

Source§

fn resolve_function_overload_with_control( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ResolvedFunctionOverload>>, SQLError>

Source§

fn resolve_function_overload_with_builtins_and_control( &self, name: &str, binding: Option<&FunctionBinding>, argument_names: &[Option<String>], argument_types: &[Option<ColumnType>], explicit_variadic: bool, builtins: &[BuiltinFunctionOverload], control: &ProductionControl<'_>, ) -> Result<Option<Produced<ResolvedFunctionOverload>>, 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 is_scalar_function_binding_with_control( &self, binding: &FunctionBinding, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Resolve the selected routine’s execution category in the caller’s production scope. Native catalog producers override this boundary; the default adapts an external resolver’s boolean callback.
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_collation_name(&self, _name: &str) -> Result<Option<u32>, SQLError>

Resolve an explicit collation name with the binding catalog’s namespace visibility and privileges.
Source§

fn resolve_collation_name_with_control( &self, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<u32>, SQLError>

Native catalogs admit namespace parsing and lookup scratch in this scope; the default adapts an external resolver’s inline result.
Source§

fn enum_labels(&self) -> Option<&dyn EnumLabelCatalog>

Enum labels of the binding catalog. Binding converts unknown literals coerced to an enum type with them, as PostgreSQL parse analysis calls the type’s input function.
Source§

fn catalog_input_functions(&self) -> Option<&dyn CatalogInputFunctions>

Input functions whose catalog constraints must run when an unknown literal is analyzed. Callers retain the returned constant; metadata-only inference does not invoke this capability.
Source§

fn resolve_scalar_subquery_type_with_control( &self, subquery: SubqueryId, outer_schema: &RowSchema, params: &[SQLParam], control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>, SQLError>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.