pub trait SQLValueCatalog {
Show 16 methods
// Required methods
fn enum_type_labels(
&self,
type_oid: u32,
) -> Result<Option<Arc<EnumTypeLabels>>>;
fn enum_label_uncommitted(&self, label_oid: u32) -> bool;
fn enum_type_name(&self, type_oid: u32) -> Result<Option<String>>;
fn has_enum_types(&self) -> bool;
// Provided methods
fn value_range_type(
&self,
_oid: u32,
) -> Result<Option<Arc<RangeValueDescriptor>>> { ... }
fn compare_range_bounds(
&self,
_range_oid: u32,
_left: &Value,
_right: &Value,
_control: &ProductionControl<'_>,
) -> Result<Ordering> { ... }
fn range_bound_equality_key(
&self,
_range_oid: u32,
_value: &Value,
_control: &ProductionControl<'_>,
) -> Result<Produced<Vec<u8>>> { ... }
fn value_type_by_oid(&self, _oid: u32) -> Result<Option<ColumnType>> { ... }
fn value_type_by_oid_with_control(
&self,
oid: u32,
control: &ProductionControl<'_>,
) -> Result<Option<Produced<ColumnType>>> { ... }
fn value_type_exists(&self, oid: u32) -> Result<bool> { ... }
fn value_regtype_output(
&self,
_ty: &ColumnType,
_oid: i64,
) -> Result<Option<String>> { ... }
fn value_composite_type(
&self,
_oid: u32,
) -> Result<Option<Arc<CompositeTypeDescriptor>>> { ... }
fn value_composite_type_with_control(
&self,
oid: u32,
control: &ProductionControl<'_>,
) -> Result<Option<OwnedCompositeTypeDescriptor>> { ... }
fn enum_type_comparison_states(&self) -> Option<&EnumTypeComparisonStates> { ... }
fn enum_value_by_oid(&self, _label_oid: u32) -> Result<Option<EnumValue>> { ... }
fn enum_label_position(
&self,
_label_oid: u32,
) -> Result<Option<(u32, usize)>> { ... }
}Expand description
Type metadata and enum support used to observe already admitted SQL values. Implementations borrow one statement catalog generation and never invoke type input.
Required Methods§
Sourcefn enum_type_labels(&self, type_oid: u32) -> Result<Option<Arc<EnumTypeLabels>>>
fn enum_type_labels(&self, type_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.
Sourcefn enum_label_uncommitted(&self, label_oid: u32) -> bool
fn enum_label_uncommitted(&self, label_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.
Sourcefn enum_type_name(&self, type_oid: u32) -> Result<Option<String>>
fn enum_type_name(&self, type_oid: u32) -> Result<Option<String>>
format_type_be of the type, which qualifies a type hidden by the search path.
Sourcefn 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.
Provided Methods§
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn value_type_by_oid_with_control(
&self,
oid: u32,
control: &ProductionControl<'_>,
) -> Result<Option<Produced<ColumnType>>>
fn value_type_by_oid_with_control( &self, oid: u32, control: &ProductionControl<'_>, ) -> Result<Option<Produced<ColumnType>>>
Native catalogs project the selected descriptor under the consumer’s allowance; external adapters retain their returned metadata.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
fn value_composite_type_with_control( &self, oid: u32, control: &ProductionControl<'_>, ) -> Result<Option<OwnedCompositeTypeDescriptor>>
Sourcefn 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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".