pub struct OwnedRuleQueryResolver {
pub expressions: OwnedInputProjections,
/* private fields */
}Fields§
§expressions: OwnedInputProjectionsImplementations§
Source§impl OwnedRuleQueryResolver
impl OwnedRuleQueryResolver
pub fn condition_with_control( &mut self, catalog: CatalogRoutineAnalysisContext<'_>, rule: &StoredRule, columns: &[ColumnDef], subject: &RoleReference, control: &ProductionControl<'_>, ) -> Result<Option<MutableExpressionPlan>, SQLError>
Source§impl OwnedRuleQueryResolver
impl OwnedRuleQueryResolver
pub fn reserved_bytes(&self) -> usize
pub fn input_columns_with_control( &self, context: RuleAnalysisContext<'_>, insert: &InsertPlan, action: &Statement, condition: Option<&Expr>, target_columns: &dyn ActionColumns, control: &ProductionControl<'_>, ) -> Result<Option<RuleInputColumns>, SQLError>
pub fn from_insert_with_control( context: RuleAnalysisContext<'_>, insert: &InsertPlan, relation: InternalRelationId, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>
Trait Implementations§
Source§impl VariableResolver for OwnedRuleQueryResolver
impl VariableResolver for OwnedRuleQueryResolver
Source§fn rewrite_with_control(
&mut self,
reference: RewriteReference<'_>,
control: &ProductionControl<'_>,
) -> Result<Option<Produced<Expr>>, SQLError>
fn rewrite_with_control( &mut self, reference: RewriteReference<'_>, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Expr>>, SQLError>
Native expression producers override this operation and admit the selected replacement before construction. External callbacks retain their own construction policy; this default copies their completed result into the caller’s syntax owner.
Source§fn resolve_name(
&mut self,
_: &str,
) -> Result<Option<ResolvedVariable>, SQLError>
fn resolve_name( &mut self, _: &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,
_: &str,
_: &str,
) -> Result<Option<ResolvedVariable>, SQLError>
fn resolve_qualified( &mut self, _: &str, _: &str, ) -> Result<Option<ResolvedVariable>, SQLError>
Current value of
qualifier.column (record field access).Source§fn resolve_param(
&mut self,
_: usize,
) -> Result<Option<ResolvedVariable>, SQLError>
fn resolve_param( &mut self, _: 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>, SQLError>
fn rewrite_qualified( &mut self, qualifier: &str, column: &str, ) -> Result<Option<Expr>, SQLError>
Expression-level counterpart of
Self::resolve_qualified.Source§fn rewrite_qualified_whole_row(
&mut self,
qualifier: &str,
) -> Result<Option<Expr>, SQLError>
fn rewrite_qualified_whole_row( &mut self, qualifier: &str, ) -> Result<Option<Expr>, SQLError>
Resolve
qualifier.* when it appears in a scalar context and therefore denotes one composite whole-row value rather than a projection list.Source§fn expand_with_control(
&mut self,
qualifier: &str,
control: &ProductionControl<'_>,
) -> Result<Option<Produced<Vec<Expr>>>>
fn expand_with_control( &mut self, qualifier: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Vec<Expr>>>>
List expansion has a separate constructor because scalar whole-row references remain one expression.
Source§fn resolve_input_with_control(
&mut self,
reference: &PLpgSQLVariableReference,
control: &ProductionControl<'_>,
) -> Result<Option<Produced<PLpgSQLInput>>>
fn resolve_input_with_control( &mut self, reference: &PLpgSQLVariableReference, control: &ProductionControl<'_>, ) -> Result<Option<Produced<PLpgSQLInput>>>
External resolvers may retain their own callback allocation policy. Native activations override this producer and admit values and type descriptors before copying them.
Source§fn resolve_parameter(
&mut self,
reference: &PLpgSQLVariableReference,
) -> Result<Option<SQLParam>>
fn resolve_parameter( &mut self, reference: &PLpgSQLVariableReference, ) -> Result<Option<SQLParam>>
Read a prepared variable with its selected concrete type. Existing resolvers
retain textual resolution; typed activation records can preserve their
descriptor without spelling and resolving it again.
Source§fn parameter_type(&self, name: &str) -> Option<ColumnType>
fn parameter_type(&self, name: &str) -> Option<ColumnType>
Concrete parameter metadata for a declared datum; catalog implementations
preserve user-type identity instead of inferring from a carrier value.
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_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 !RefUnwindSafe for OwnedRuleQueryResolver
impl !UnwindSafe for OwnedRuleQueryResolver
impl Freeze for OwnedRuleQueryResolver
impl Send for OwnedRuleQueryResolver
impl Sync for OwnedRuleQueryResolver
impl Unpin for OwnedRuleQueryResolver
impl UnsafeUnpin for OwnedRuleQueryResolver
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