pub struct EngineValueCatalog<'a>(pub &'a dyn EngineHook);Expand description
Adapt a scalar context without requiring embedders that only provide domain or composite metadata to implement enum support.
Tuple Fields§
§0: &'a dyn EngineHookTrait Implementations§
Source§impl SQLValueCatalog for EngineValueCatalog<'_>
impl SQLValueCatalog for EngineValueCatalog<'_>
Source§fn compare_range_bounds(
&self,
range_oid: u32,
left: &Value,
right: &Value,
control: &ProductionControl<'_>,
) -> Result<Ordering>
fn compare_range_bounds( &self, range_oid: u32, left: &Value, right: &Value, control: &ProductionControl<'_>, ) -> Result<Ordering>
Compare admitted bounds with the range’s captured operator class and collation. Invocation state belongs to the support-function owner; this operation must not perform endpoint input or range canonicalization.
Source§fn range_bound_equality_key(
&self,
range_oid: u32,
value: &Value,
control: &ProductionControl<'_>,
) -> Result<Produced<Vec<u8>>>
fn range_bound_equality_key( &self, range_oid: u32, value: &Value, control: &ProductionControl<'_>, ) -> Result<Produced<Vec<u8>>>
Return an admitted exact equality key for one finite bound under the same selected operation. Keys must coincide exactly when
compare_range_bounds returns Equal; an ordinary hash is not an exact key. Execution owns this encoding and any selected normalization.Source§fn value_range_type(
&self,
oid: u32,
) -> Result<Option<Arc<RangeValueDescriptor>>>
fn value_range_type( &self, oid: u32, ) -> Result<Option<Arc<RangeValueDescriptor>>>
The selected endpoint layout of a range or multirange in this statement generation. Observation does not execute input, domain checks or a canonical support function.
Source§fn value_regtype_output(
&self,
ty: &ColumnType,
oid: i64,
) -> Result<Option<String>>
fn value_regtype_output( &self, ty: &ColumnType, oid: i64, ) -> Result<Option<String>>
Current SQL spelling of an admitted catalog OID alias;
None retains numeric output.Source§fn value_type_by_oid(&self, oid: u32) -> Result<Option<ColumnType>>
fn value_type_by_oid(&self, oid: u32) -> Result<Option<ColumnType>>
The declared type for a physical OID, including domains, arrays and composites.
Source§fn value_type_exists(&self, oid: u32) -> Result<bool>
fn value_type_exists(&self, oid: u32) -> Result<bool>
Whether an admitted physical OID names any current catalog type, including pseudo-types without a value carrier. This lookup does not check input privileges or execute type input.
Source§fn value_composite_type(
&self,
oid: u32,
) -> Result<Option<Arc<CompositeTypeDescriptor>>>
fn value_composite_type( &self, oid: u32, ) -> Result<Option<Arc<CompositeTypeDescriptor>>>
The current descriptor of an admitted composite value.
Source§fn enum_type_comparison_states(&self) -> Option<&EnumTypeComparisonStates>
fn enum_type_comparison_states(&self) -> Option<&EnumTypeComparisonStates>
The session’s comparison support functions, shared by declared type across nested array and record calls. Pure catalog readers do not own runtime state.
Source§fn enum_type_labels(&self, oid: u32) -> Result<Option<Arc<EnumTypeLabels>>>
fn enum_type_labels(&self, oid: u32) -> Result<Option<Arc<EnumTypeLabels>>>
The labels of one enum type in the statement’s catalog generation, or
None when the catalog has no such type.Source§fn enum_value_by_oid(&self, oid: u32) -> Result<Option<EnumValue>>
fn enum_value_by_oid(&self, oid: u32) -> Result<Option<EnumValue>>
Resolve an already admitted physical label OID across enum types. Output uses the label’s actual identity even if a retained tuple now declares another enum type; it does not repeat input safety checks.
Source§fn enum_label_position(&self, oid: u32) -> Result<Option<(u32, usize)>>
fn enum_label_position(&self, oid: u32) -> Result<Option<(u32, usize)>>
The actual enum type and zero-based label position of an admitted physical OID in this generation. Positions have declaration/key order and avoid copying label keys for comparison.
Source§fn enum_label_uncommitted(&self, oid: u32) -> bool
fn enum_label_uncommitted(&self, oid: u32) -> bool
Whether the current transaction added this label to a type that it did not create.
PostgreSQL rejects such a label until the transaction commits.Source§fn enum_type_name(&self, oid: u32) -> Result<Option<String>>
fn enum_type_name(&self, oid: u32) -> Result<Option<String>>
format_type_be of the type, which qualifies a type hidden by the search path.Source§fn has_enum_types(&self) -> bool
fn has_enum_types(&self) -> bool
Whether the statement catalog defines any enum type; binding skips enum literal validation otherwise.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EngineValueCatalog<'a>
impl<'a> !Send for EngineValueCatalog<'a>
impl<'a> !Sync for EngineValueCatalog<'a>
impl<'a> !UnwindSafe for EngineValueCatalog<'a>
impl<'a> Freeze for EngineValueCatalog<'a>
impl<'a> Unpin for EngineValueCatalog<'a>
impl<'a> UnsafeUnpin for EngineValueCatalog<'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