pub struct ColumnTypeSchema<'a> { /* private fields */ }Expand description
Zero-allocation view matching RowSchema::with_types for the supplied unqualified column definitions. Names and declared types, including domains and nested arrays, stay borrowed from their existing owner. Duplicate exact names remain ambiguous; dots in an identifier do not create a relation qualifier.
Implementations§
Source§impl<'a> ColumnTypeSchema<'a>
impl<'a> ColumnTypeSchema<'a>
pub fn new(columns: &'a [ColumnDef]) -> Self
Sourcepub fn with_relation(
columns: &'a [ColumnDef],
name: &'a str,
row_type: &'a ColumnType,
) -> Result<Self, SQLError>
pub fn with_relation( columns: &'a [ColumnDef], name: &'a str, row_type: &'a ColumnType, ) -> Result<Self, SQLError>
Retain the declaring relation’s actual row type without copying its columns or representing system attributes as user columns.
Trait Implementations§
Source§impl<'a> Clone for ColumnTypeSchema<'a>
impl<'a> Clone for ColumnTypeSchema<'a>
impl<'a> Copy for ColumnTypeSchema<'a>
Source§impl ExpressionSchema for ColumnTypeSchema<'_>
impl ExpressionSchema for ColumnTypeSchema<'_>
fn column_reference( &self, name: &str, qualifier: Option<&str>, ) -> Result<ColumnReference<'_>, SQLError>
Source§fn whole_row_reference(
&self,
qualifier: &str,
) -> Result<ColumnReference<'_>, SQLError>
fn whole_row_reference( &self, qualifier: &str, ) -> Result<ColumnReference<'_>, SQLError>
Whole-row Vars retain attribute zero and the relation’s actual named type, independently of its current live attribute list.
Source§impl ScalarTypeSchema for ColumnTypeSchema<'_>
impl ScalarTypeSchema for ColumnTypeSchema<'_>
fn column_collation(&self, position: usize) -> Option<u32>
fn collation_of(&self, name: &str) -> Option<u32>
fn has_unqualified_column(&self, name: &str) -> bool
fn column_is_ambiguous(&self, name: &str) -> bool
fn type_of(&self, name: &str) -> Option<&ColumnType>
fn column_type(&self, position: usize) -> Option<&ColumnType>
fn internal_type(&self, _: InternalColumnRef) -> Option<&ColumnType>
fn has_qualifier(&self, qualifier: &str) -> bool
Source§fn whole_row_type(&self, qualifier: &str) -> Option<&ColumnType>
fn whole_row_type(&self, qualifier: &str) -> Option<&ColumnType>
The named composite identity of a relation’s whole row, when the caller retains it. Query-only scopes may expose an anonymous record instead.
fn has_qualified_column(&self, qualifier: &str, name: &str) -> bool
fn qualified_column_is_ambiguous(&self, qualifier: &str, name: &str) -> bool
fn qualified_type(&self, qualifier: &str, name: &str) -> Option<&ColumnType>
fn qualified_collation(&self, qualifier: &str, name: &str) -> Option<u32>
fn columns_are_open(&self, _: Option<&str>) -> bool
Source§fn physical_schema(&self) -> Option<&RowSchema>
fn physical_schema(&self) -> Option<&RowSchema>
Preserve the physical outer-row interface used by existing custom scalar-subquery resolvers. Declared column views have no query arena or physical outer row.
Source§fn observed_expression_type(
&self,
_: &ScalarExpr,
) -> Option<Option<&ColumnType>>
fn observed_expression_type( &self, _: &ScalarExpr, ) -> Option<Option<&ColumnType>>
Reuse an already analyzed expression occurrence in this scope.
Some(None) preserves an observed unknown type; None asks the caller to infer the expression normally. Borrowed observations must not outlive their original expressions or parameter environment.fn internal_collation(&self, column: InternalColumnRef) -> Option<u32>
Auto Trait Implementations§
impl<'a> Freeze for ColumnTypeSchema<'a>
impl<'a> RefUnwindSafe for ColumnTypeSchema<'a>
impl<'a> Send for ColumnTypeSchema<'a>
impl<'a> Sync for ColumnTypeSchema<'a>
impl<'a> Unpin for ColumnTypeSchema<'a>
impl<'a> UnsafeUnpin for ColumnTypeSchema<'a>
impl<'a> UnwindSafe for ColumnTypeSchema<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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