pub struct SchemaCatalog { /* private fields */ }Implementations§
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn count_owners(&self) -> &CatalogCountOwnerAnalysis
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn discriminant_triggers<'a>( &'a self, table: &'a CatalogTable, ) -> impl Iterator<Item = &'a str>
Source§impl SchemaCatalog
impl SchemaCatalog
Sourcepub fn schema_enums(&self) -> impl Iterator<Item = &CatalogEnum>
pub fn schema_enums(&self) -> impl Iterator<Item = &CatalogEnum>
Enums owned by the selected schema, excluding external enum types retained only for classifying columns that directly use them.
pub fn enum_type(&self, name: &str) -> Option<&CatalogEnum>
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn table_line(&self, table: &str) -> usize
pub fn column_line(&self, table: &str, column: &str) -> usize
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn materialized_view(&self, name: &str) -> Option<&CatalogView>
pub fn has_descendants(&self, relation: &str) -> Option<bool>
Sourcepub fn same_relation(&self, left: &str, right: &str) -> bool
pub fn same_relation(&self, left: &str, right: &str) -> bool
Whether two SQL names have the same catalog identity. Equating a bare name with a schema-qualified one requires explicit evidence for the selected schema.
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn resolve_columns( &self, table: &str, target: &[String], predicate: Option<&str>, ) -> ResolvedArbiter
pub fn resolve_constraint(&self, table: &str, name: &str) -> ResolvedArbiter
pub fn has_canonical_prefix( &self, table: &str, order: &[CanonicalOrderKey], ) -> bool
pub fn has_canonical_prefix_for_qualifiers( &self, table: &str, qualifiers: &[String], order: &[CanonicalOrderKey], pinned: &[String], ) -> bool
Sourcepub fn unique_keys(&self, table: &str) -> Vec<Vec<String>>
pub fn unique_keys(&self, table: &str) -> Vec<Vec<String>>
Column sets that hold at most one row per value: valid, ready, live, immediate, non-partial unique or primary indexes whose keys are all plain columns.
A partial index only covers some rows and a deferrable one may hold duplicates inside a transaction, so neither proves uniqueness. Expression keys are not columns.
Sourcepub fn bounded_unique_indexes(&self, table: &str) -> &[BoundedUniqueIndex]
pub fn bounded_unique_indexes(&self, table: &str) -> &[BoundedUniqueIndex]
Preparsed unique index evidence for bounded-row proofs, including partial and expression
indexes. Ordinary unique_keys intentionally retains its unconditional column contract.
Sourcepub fn columns_pin_one_row(&self, table: &str, columns: &[String]) -> bool
pub fn columns_pin_one_row(&self, table: &str, columns: &[String]) -> bool
Whether equality on columns holds table to at most one row: some unique key of
Self::unique_keys lies wholly among them.
Sourcepub fn column_is_not_null(&self, table: &str, column: &str) -> bool
pub fn column_is_not_null(&self, table: &str, column: &str) -> bool
Whether column of a base table cannot hold NULL. ctid never does.
Any other column uses the base-table identity, so a view that shares the name does not count.
Source§impl SchemaCatalog
impl SchemaCatalog
Sourcepub fn relation_row_security(&self, name: &str) -> Option<&CatalogRowSecurity>
pub fn relation_row_security(&self, name: &str) -> Option<&CatalogRowSecurity>
Row security evidence for the resolved base relation, when the catalog recorded it.
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn resolve_before_temp( &self, earlier: &[String], name: &str, ) -> SearchPathResolution
Sourcepub fn hides_selected_relation(&self, earlier: &[String], name: &str) -> bool
pub fn hides_selected_relation(&self, earlier: &[String], name: &str) -> bool
Whether explicit evidence proves an earlier search-path entry or pg_temp hides the selected catalog relation. Unknown entries preserve the conservative catalog check.
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn logical_tables(&self) -> impl Iterator<Item = &CatalogTable>
pub fn logical_partition_tables<'a>( &'a self, relation: &str, ) -> impl Iterator<Item = &'a CatalogTable> + 'a
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn trigger_body_kinds(&self) -> Result<&[CatalogTriggerBodyKind]>
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn trigger_write_effects(&self) -> Result<&[CatalogTriggerWrites]>
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn view_query(&self, name: &str) -> Option<Arc<Query>>
pub fn try_view_query( &self, name: &str, ) -> Result<Arc<Query>, PostgresParseError>
pub fn view_column_names(&self, name: &str) -> Option<Arc<BTreeSet<String>>>
pub fn view_column_layout(&self, name: &str) -> Option<Arc<[String]>>
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn has_exact_relation(&self, name: &str) -> bool
pub fn bounded_view_relation(&self, name: &str) -> Option<&CatalogView>
Sourcepub fn bounded_relation(&self, name: &str) -> Option<&CatalogTable>
pub fn bounded_relation(&self, name: &str) -> Option<&CatalogTable>
A table identity safe for cardinality proof when a bare name could also be a view.
Sourcepub fn view_relation(&self, name: &str) -> Option<&CatalogView>
pub fn view_relation(&self, name: &str) -> Option<&CatalogView>
Resolve only one known view and never treat a colliding table as a view.
Source§impl SchemaCatalog
impl SchemaCatalog
pub fn coverage(&self) -> CatalogCoverage
Sourcepub fn current_database(&self) -> Option<&str>
pub fn current_database(&self) -> Option<&str>
Exact connected database name, when explicitly supplied by the catalog producer.
Sourcepub fn declared_schema(&self) -> Option<&str>
pub fn declared_schema(&self) -> Option<&str>
Schema named by the catalog snapshot, when the producer set one.
pub fn load( root: &Path, raw_path: &str, sources: &dyn SourceAccess, ) -> Result<Self>
pub fn tables(&self) -> impl Iterator<Item = &CatalogTable>
Sourcepub fn table(&self, name: &str) -> Option<&CatalogTable>
pub fn table(&self, name: &str) -> Option<&CatalogTable>
Tables are indexed by normalized name, so a quoted key such as "Order Items" is found
by its quoted or unquoted spelling, the way it round-trips from the generator.
Sourcepub fn relation(&self, name: &str) -> Option<&CatalogTable>
pub fn relation(&self, name: &str) -> Option<&CatalogTable>
The table a SQL name refers to: its exact key, or the one table whose bare name it is.
A name that spells a schema reaches a bare-keyed table only when it is this catalog’s
schema; audit.accounts is not the accounts of the catalog for public.
pub fn functions(&self) -> impl Iterator<Item = &CatalogFunction>
pub fn enums(&self) -> impl Iterator<Item = &CatalogEnum>
pub fn views(&self) -> impl Iterator<Item = &CatalogView>
Trait Implementations§
Source§impl CatalogLifecycleLookup for SchemaCatalog
impl CatalogLifecycleLookup for SchemaCatalog
fn current_database(&self) -> Option<&str>
fn resolve_before_temp( &self, earlier: &[String], name: &str, ) -> SearchPathResolution
fn scalar_function_names(&self) -> Arc<BTreeSet<Vec<String>>> ⓘ
Source§impl Clone for SchemaCatalog
impl Clone for SchemaCatalog
Source§impl Debug for SchemaCatalog
impl Debug for SchemaCatalog
Auto Trait Implementations§
impl !Freeze for SchemaCatalog
impl !RefUnwindSafe for SchemaCatalog
impl !UnwindSafe for SchemaCatalog
impl Forget for SchemaCatalog
impl Move for SchemaCatalog
impl Send for SchemaCatalogwhere
RawVecInner: Send,
NodeRef<Owned, String, Option<BTreeSet<String>>, LeafOrInternal>: Send,
BoxRaw<(String, Option<BTreeSet<String>>)>: Send,
NodeRef<Owned, String, ArbiterTable, LeafOrInternal>: Send,
BoxRaw<(String, ArbiterTable)>: Send,
NodeRef<Owned, String, CatalogTable, LeafOrInternal>: Send,
BoxRaw<(String, CatalogTable)>: Send,
NodeRef<Owned, String, CatalogRowSecurity, LeafOrInternal>: Send,
BoxRaw<(String, CatalogRowSecurity)>: Send,
NodeRef<Owned, String, bool, LeafOrInternal>: Send,
BoxRaw<(String, bool)>: Send,
OnceLock<RelationFallback>: Send,
NodeRef<Owned, String, CatalogFunction, LeafOrInternal>: Send,
BoxRaw<(String, CatalogFunction)>: Send,
NodeRef<Owned, String, BTreeMap<String, String>, LeafOrInternal>: Send,
BoxRaw<(String, BTreeMap<String, String>)>: Send,
Arc<OnceLock<Arc<ProjectionCache>>>: Send,
NodeRef<Owned, String, CatalogEnum, LeafOrInternal>: Send,
BoxRaw<(String, CatalogEnum)>: Send,
NodeRef<Owned, String, CatalogView, LeafOrInternal>: Send,
BoxRaw<(String, CatalogView)>: Send,
NodeRef<Owned, String, usize, LeafOrInternal>: Send,
BoxRaw<(String, usize)>: Send,
NodeRef<Owned, (String, String), usize, LeafOrInternal>: Send,
BoxRaw<((String, String), usize)>: Send,
impl Sync for SchemaCatalogwhere
RawVecInner: Sync,
NodeRef<Owned, String, Option<BTreeSet<String>>, LeafOrInternal>: Sync,
BoxRaw<(String, Option<BTreeSet<String>>)>: Sync,
NodeRef<Owned, String, ArbiterTable, LeafOrInternal>: Sync,
BoxRaw<(String, ArbiterTable)>: Sync,
NodeRef<Owned, String, CatalogTable, LeafOrInternal>: Sync,
BoxRaw<(String, CatalogTable)>: Sync,
NodeRef<Owned, String, CatalogRowSecurity, LeafOrInternal>: Sync,
BoxRaw<(String, CatalogRowSecurity)>: Sync,
NodeRef<Owned, String, bool, LeafOrInternal>: Sync,
BoxRaw<(String, bool)>: Sync,
OnceLock<RelationFallback>: Sync,
NodeRef<Owned, String, CatalogFunction, LeafOrInternal>: Sync,
BoxRaw<(String, CatalogFunction)>: Sync,
NodeRef<Owned, String, BTreeMap<String, String>, LeafOrInternal>: Sync,
BoxRaw<(String, BTreeMap<String, String>)>: Sync,
Arc<OnceLock<Arc<ProjectionCache>>>: Sync,
NodeRef<Owned, String, CatalogEnum, LeafOrInternal>: Sync,
BoxRaw<(String, CatalogEnum)>: Sync,
NodeRef<Owned, String, CatalogView, LeafOrInternal>: Sync,
BoxRaw<(String, CatalogView)>: Sync,
NodeRef<Owned, String, usize, LeafOrInternal>: Sync,
BoxRaw<(String, usize)>: Sync,
NodeRef<Owned, (String, String), usize, LeafOrInternal>: Sync,
BoxRaw<((String, String), usize)>: Sync,
impl Unpin for SchemaCatalogwhere
*const u8 is !null: Unpin,
*const LeafNode<String, Option<BTreeSet<String>>> is !null: Unpin,
Box<(String, Option<BTreeSet<String>>)>: Unpin,
*const LeafNode<String, ArbiterTable> is !null: Unpin,
Box<(String, ArbiterTable)>: Unpin,
*const LeafNode<String, CatalogTable> is !null: Unpin,
Box<(String, CatalogTable)>: Unpin,
*const LeafNode<String, CatalogRowSecurity> is !null: Unpin,
Box<(String, CatalogRowSecurity)>: Unpin,
*const LeafNode<String, bool> is !null: Unpin,
Box<(String, bool)>: Unpin,
Align4<u32>: Unpin,
*const LeafNode<String, Option<String>> is !null: Unpin,
Box<(String, Option<String>)>: Unpin,
*const LeafNode<String, String> is !null: Unpin,
Box<(String, String)>: Unpin,
*const LeafNode<String, CatalogFunction> is !null: Unpin,
Box<(String, CatalogFunction)>: Unpin,
*const LeafNode<String, BTreeMap<String, String>> is !null: Unpin,
Box<(String, BTreeMap<String, String>)>: Unpin,
Arc<OnceLock<Arc<ProjectionCache>>>: Unpin,
*const LeafNode<String, CatalogEnum> is !null: Unpin,
Box<(String, CatalogEnum)>: Unpin,
*const LeafNode<String, CatalogView> is !null: Unpin,
Box<(String, CatalogView)>: Unpin,
*const LeafNode<String, usize> is !null: Unpin,
Box<(String, usize)>: Unpin,
*const LeafNode<(String, String), usize> is !null: Unpin,
Box<((String, String), usize)>: Unpin,
impl UnsafeUnpin for SchemaCatalogwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, Option<BTreeSet<String>>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Option<BTreeSet<String>>)>>: UnsafeUnpin,
*const LeafNode<String, ArbiterTable> is !null: UnsafeUnpin,
PhantomData<Box<(String, ArbiterTable)>>: UnsafeUnpin,
*const LeafNode<String, CatalogTable> is !null: UnsafeUnpin,
PhantomData<Box<(String, CatalogTable)>>: UnsafeUnpin,
*const LeafNode<String, CatalogRowSecurity> is !null: UnsafeUnpin,
PhantomData<Box<(String, CatalogRowSecurity)>>: UnsafeUnpin,
*const LeafNode<String, bool> is !null: UnsafeUnpin,
PhantomData<Box<(String, bool)>>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
*const LeafNode<String, Option<String>> is !null: UnsafeUnpin,
PhantomData<Box<(String, Option<String>)>>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
PhantomData<RelationFallback>: UnsafeUnpin,
*const LeafNode<String, CatalogFunction> is !null: UnsafeUnpin,
PhantomData<Box<(String, CatalogFunction)>>: UnsafeUnpin,
*const LeafNode<String, BTreeMap<String, String>> is !null: UnsafeUnpin,
PhantomData<Box<(String, BTreeMap<String, String>)>>: UnsafeUnpin,
*const ArcInner<OnceLock<Arc<ProjectionCache>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<OnceLock<Arc<ProjectionCache>>>>: UnsafeUnpin,
*const LeafNode<String, CatalogEnum> is !null: UnsafeUnpin,
PhantomData<Box<(String, CatalogEnum)>>: UnsafeUnpin,
*const LeafNode<String, CatalogView> is !null: UnsafeUnpin,
PhantomData<Box<(String, CatalogView)>>: UnsafeUnpin,
*const LeafNode<String, usize> is !null: UnsafeUnpin,
PhantomData<Box<(String, usize)>>: UnsafeUnpin,
*const LeafNode<(String, String), usize> is !null: UnsafeUnpin,
PhantomData<Box<((String, String), usize)>>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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