pub struct RuleConditionNameResolver<'a> {
pub columns: &'a [(String, ColumnType)],
pub event: RuleEvent,
}Fields§
§columns: &'a [(String, ColumnType)]§event: RuleEventTrait Implementations§
Source§impl VariableResolver for RuleConditionNameResolver<'_>
impl VariableResolver for RuleConditionNameResolver<'_>
Source§fn resolve_name(
&mut self,
_name: &str,
) -> Result<Option<ResolvedVariable>, SQLError>
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>
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>
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>
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>>
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>>>
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>>
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>>
fn rewrite_param(&mut self, index: usize) -> Result<Option<Expr>>
Expression-level counterpart of
Self::resolve_param.Auto Trait Implementations§
impl<'a> Freeze for RuleConditionNameResolver<'a>
impl<'a> RefUnwindSafe for RuleConditionNameResolver<'a>
impl<'a> Send for RuleConditionNameResolver<'a>
impl<'a> Sync for RuleConditionNameResolver<'a>
impl<'a> Unpin for RuleConditionNameResolver<'a>
impl<'a> UnsafeUnpin for RuleConditionNameResolver<'a>
impl<'a> UnwindSafe for RuleConditionNameResolver<'a>
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
Mutably borrows from an owned value. Read more
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> ⓘ
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 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> ⓘ
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