Skip to main content

RuleConditionNameResolver

Struct RuleConditionNameResolver 

Source
pub struct RuleConditionNameResolver<'a> {
    pub columns: &'a [(String, ColumnType)],
    pub event: RuleEvent,
}

Fields§

§columns: &'a [(String, ColumnType)]§event: RuleEvent

Trait Implementations§

Source§

impl VariableResolver for RuleConditionNameResolver<'_>

Source§

fn resolve_name( &mut self, _name: &str, ) -> Result<Option<ResolvedVariable>, SQLError>

Current value of an unqualified name. Ok(None) leaves the column reference for the engine to resolve.
Source§

fn resolve_qualified( &mut self, _qualifier: &str, _column: &str, ) -> Result<Option<ResolvedVariable>, SQLError>

Current value of qualifier.column (record field access).
Source§

fn resolve_param( &mut self, _index: usize, ) -> Result<Option<ResolvedVariable>, SQLError>

Value of a positional $n reference (function arguments).
Source§

fn rewrite_name(&mut self, name: &str) -> Result<Option<Expr>, SQLError>

Optional expression-level rewrite hook. The default preserves the variable-substitution behavior used by PL/pgSQL while allowing catalog lifecycle code to rewrite a reference without fabricating a literal value.
Source§

fn rewrite_qualified( &mut self, qualifier: &str, column: &str, ) -> Result<Option<Expr>>

Expression-level counterpart of Self::resolve_qualified.
Source§

fn rewrite_qualified_star( &mut self, _qualifier: &str, ) -> Result<Option<Vec<Expr>>>

Expand qualifier.* when the containing SQL construct treats it as a list item. Scalar binding deliberately does not call this hook because PostgreSQL treats the same syntax as a composite whole-row value in scalar contexts.
Source§

fn rewrite_qualified_whole_row( &mut self, _qualifier: &str, ) -> Result<Option<Expr>>

Resolve qualifier.* when it appears in a scalar context and therefore denotes one composite whole-row value rather than a projection list.
Source§

fn rewrite_param(&mut self, index: usize) -> Result<Option<Expr>>

Expression-level counterpart of Self::resolve_param.
Source§

fn rewrite_internal( &mut self, _column: InternalColumnRef, ) -> Result<Option<Expr>>

Observe or replace an executor-only structural column reference. SQL variable resolvers normally leave these untouched.

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.