Skip to main content

SchemaCatalog

Struct SchemaCatalog 

Source
pub struct SchemaCatalog { /* private fields */ }

Implementations§

Source§

impl SchemaCatalog

Source§

impl SchemaCatalog

Source

pub fn discriminant_triggers<'a>( &'a self, table: &'a CatalogTable, ) -> impl Iterator<Item = &'a str>

Source§

impl SchemaCatalog

Source

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.

Source

pub fn enum_type(&self, name: &str) -> Option<&CatalogEnum>

Source§

impl SchemaCatalog

Source

pub fn table_line(&self, table: &str) -> usize

Source

pub fn column_line(&self, table: &str, column: &str) -> usize

Source§

impl SchemaCatalog

Source

pub fn view_line(&self, view: &str) -> usize

The line of a view’s key in the catalog source.

Source

pub fn materialized_view(&self, name: &str) -> Option<&CatalogView>

Source

pub fn has_descendants(&self, relation: &str) -> Option<bool>

Source

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

Source

pub fn resolve_columns( &self, table: &str, target: &[String], predicate: Option<&str>, ) -> ResolvedArbiter

Source

pub fn resolve_constraint(&self, table: &str, name: &str) -> ResolvedArbiter

Source

pub fn has_canonical_prefix( &self, table: &str, order: &[CanonicalOrderKey], ) -> bool

Source

pub fn has_canonical_prefix_for_qualifiers( &self, table: &str, qualifiers: &[String], order: &[CanonicalOrderKey], pinned: &[String], ) -> bool

Source

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.

Source

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.

Source

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.

Source

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

Source

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

Source

pub fn resolve_before_temp( &self, earlier: &[String], name: &str, ) -> SearchPathResolution

Source

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

Source

pub fn logical_tables(&self) -> impl Iterator<Item = &CatalogTable>

Source

pub fn logical_partition_tables<'a>( &'a self, relation: &str, ) -> impl Iterator<Item = &'a CatalogTable> + 'a

Source§

impl SchemaCatalog

Source§

impl SchemaCatalog

Source§

impl SchemaCatalog

Source

pub fn view_query(&self, name: &str) -> Option<Arc<Query>>

Source

pub fn try_view_query( &self, name: &str, ) -> Result<Arc<Query>, PostgresParseError>

Source

pub fn view_column_names(&self, name: &str) -> Option<Arc<BTreeSet<String>>>

Source

pub fn view_column_layout(&self, name: &str) -> Option<Arc<[String]>>

Source§

impl SchemaCatalog

Source

pub fn has_exact_relation(&self, name: &str) -> bool

Source

pub fn bounded_view_relation(&self, name: &str) -> Option<&CatalogView>

Source

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.

Source

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

Source

pub fn coverage(&self) -> CatalogCoverage

Source

pub fn current_database(&self) -> Option<&str>

Exact connected database name, when explicitly supplied by the catalog producer.

Source

pub fn declared_schema(&self) -> Option<&str>

Schema named by the catalog snapshot, when the producer set one.

Source

pub fn load( root: &Path, raw_path: &str, sources: &dyn SourceAccess, ) -> Result<Self>

Source

pub fn tables(&self) -> impl Iterator<Item = &CatalogTable>

Source

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.

Source

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.

Source

pub fn functions(&self) -> impl Iterator<Item = &CatalogFunction>

Source

pub fn enums(&self) -> impl Iterator<Item = &CatalogEnum>

Source

pub fn views(&self) -> impl Iterator<Item = &CatalogView>

Trait Implementations§

Source§

impl CatalogLifecycleLookup for SchemaCatalog

Source§

impl Clone for SchemaCatalog

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SchemaCatalog

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SchemaCatalog

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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 SchemaCatalog
where 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 SchemaCatalog
where 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 SchemaCatalog
where *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 SchemaCatalog
where *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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.