Skip to main content

CatalogReadView

Struct CatalogReadView 

Source
pub struct CatalogReadView { /* private fields */ }
Expand description

Immutable catalog inputs with optional query read attribution. This view cannot change definitions, coordinate DDL, publish caches, or recover the enclosing engine.

Implementations§

Source§

impl CatalogReadView

Source

pub fn range_definition_by_oid( &self, oid: u32, ) -> Result<Option<&StoredRange>, SQLError>

Resolve either value identity to the pinned definition. The generation builds its OID index once; repeated bound operations neither scan the registry nor clone definitions.

Source

pub fn range_value_descriptor( &self, oid: u32, ) -> Result<Option<Arc<RangeValueDescriptor>>, SQLError>

Borrow pinned layout support without resolving mutable names or invoking endpoint input. An empty range registry adds no descriptor-cache allocation.

Source§

impl CatalogReadView

Source

pub fn with_graph_reads( self, template: GraphStoreHandle, context: SerializableReadContext, cancellation: &CancellationToken, ) -> Self

Retain the original participant independently from the catalog’s immutable definitions. Binding alone records no reads.

Source

pub fn read_graph_names(&self) -> Result<Vec<String>, SQLError>

Catalog row consumption observes the complete name set, including an empty result.

Source

pub fn graph_labels( &self, graph: &str, ) -> Result<Option<Vec<GraphLabelInfo>>, SQLError>

Source

pub fn graph_label_kind( &self, graph: &str, label: &str, ) -> Result<Option<LabelKind>, SQLError>

Source

pub fn graph_names(&self) -> Vec<String>

Unobserved names for binding and restoration; row consumers use read_graph_names.

Source

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

Source

pub fn graph_names_iter(&self) -> impl Iterator<Item = &str>

Borrow the selected namespace without producing graph handles or names.

Source

pub fn graph_next_label_id(&self, graph: &str) -> Result<Option<u32>, SQLError>

Source

pub fn graph_label_count( &self, graph: &str, label: &str, kind: LabelKind, ) -> Result<Option<usize>, SQLError>

Source

pub fn graph_vertices( &self, graph: &str, ) -> Result<Option<Vec<Vertex>>, SQLError>

Source

pub fn graph_edges(&self, graph: &str) -> Result<Option<Vec<Edge>>, SQLError>

Source§

impl CatalogReadView

Source§

impl CatalogReadView

Source§

impl CatalogReadView

Source

pub fn role_is_enabled_for( &self, member: &(impl RoleSubject + ?Sized), role: &(impl RoleSubject + ?Sized), ) -> bool

Source

pub fn table_is_visible_to( &self, table: &CatalogTableSnapshot, role: &(impl RoleSubject + ?Sized), ) -> bool

Source

pub fn table_has_privilege_to( &self, table: &CatalogTableSnapshot, role: &(impl RoleSubject + ?Sized), privilege: TableAclPrivilege, ) -> bool

Source

pub fn table_column_has_privilege_to( &self, table: &CatalogTableSnapshot, column: &str, role: &(impl RoleSubject + ?Sized), privilege: TableAclPrivilege, ) -> bool

Source

pub fn table_column_is_visible_to( &self, table: &CatalogTableSnapshot, column: &str, role: &(impl RoleSubject + ?Sized), ) -> bool

Source

pub fn view_is_visible_to( &self, view: &StoredView, role: &(impl RoleSubject + ?Sized), ) -> bool

Source

pub fn view_has_privilege_to( &self, view: &StoredView, role: &(impl RoleSubject + ?Sized), privilege: TableAclPrivilege, ) -> bool

Source

pub fn view_column_has_privilege_to( &self, view: &StoredView, column: &str, role: &(impl RoleSubject + ?Sized), privilege: TableAclPrivilege, ) -> bool

Source

pub fn view_column_is_visible_to( &self, view: &StoredView, column: &str, role: &(impl RoleSubject + ?Sized), ) -> bool

Source

pub fn foreign_table_is_visible_to( &self, name: &str, role: &(impl RoleSubject + ?Sized), ) -> Result<bool, SQLError>

Source

pub fn foreign_table_has_privilege_to( &self, name: &str, role: &(impl RoleSubject + ?Sized), privilege: TableAclPrivilege, ) -> Result<bool, SQLError>

Source

pub fn foreign_table_column_has_privilege_to( &self, name: &str, column: &str, role: &(impl RoleSubject + ?Sized), privilege: TableAclPrivilege, ) -> Result<bool, SQLError>

Source

pub fn foreign_table_column_is_visible_to( &self, name: &str, column: &str, role: &(impl RoleSubject + ?Sized), ) -> Result<bool, SQLError>

Source§

impl CatalogReadView

Source

pub fn hierarchy_scan_tables_with_control( &self, resolution: &RelationNameResolution, name: &str, include_descendants: bool, control: &ProductionControl<'_>, ) -> Result<Produced<Vec<String>>, SQLError>

Source§

impl CatalogReadView

Source

pub fn sequence_exists_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Analysis selects a declaration without reading runtime sequence positions or security payloads.

Source

pub fn virtual_relation_resolved_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<VirtualRelation>, SQLError>

Source

pub fn view_resolved_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<&StoredView>, SQLError>

Source

pub fn view_name_resolved_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<String>>, SQLError>

Source

pub fn foreign_table_resolved_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<&StoredForeignTable>, SQLError>

Source

pub fn table_resolved_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<&CatalogTableSnapshot>, SQLError>

Source

pub fn table_name_resolved_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<String>>, SQLError>

Source§

impl CatalogReadView

Source

pub fn relation_kind_resolution( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<RelationResolution, SQLError>

Source

pub fn relation_kind_resolution_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Produced<RelationResolution>, SQLError>

Source

pub fn virtual_relation_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<VirtualRelation>, SQLError>

Source

pub fn all_schema_names(&self) -> Vec<String>

Source

pub fn schema_security(&self, name: &str) -> Option<&BoundSchemaSecurity>

Source

pub fn schema_security_names( &self, name: &str, ) -> Result<Option<SchemaSecurity>, SQLError>

Source

pub fn database_security(&self) -> &BoundDatabaseSecurity

Source

pub fn database_security_names(&self) -> Result<DatabaseSecurity, SQLError>

Source

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

Source

pub fn table_names(&self) -> Vec<String>

Source

pub fn roles(&self) -> impl Iterator<Item = &RoleDefinition>

Source

pub fn relation_security_names( &self, security: &BoundTableSecurity, ) -> Result<TableSecurity, SQLError>

Source

pub fn view_owner(&self, view: &StoredView) -> Result<RoleReference, SQLError>

Source

pub fn view_owner_with_control( &self, owner: RoleIdentity, control: &ProductionControl<'_>, ) -> Result<RoleReference, SQLError>

Source

pub fn bind_role(&self, name: &str) -> Result<RoleReference, SQLError>

Source

pub fn role_oid(&self, name: &str) -> Result<i64, SQLError>

Source

pub fn role_memberships(&self) -> impl Iterator<Item = &RoleMembership>

Source

pub fn graph_catalog_oids(&self, graph: &str) -> Option<&GraphCatalogOids>

The OIDs the graph recorded when it and its labels were created; None for a graph created before OIDs were recorded.

Source

pub fn sequence_catalog_oid(&self, object_id: &[u8; 16]) -> i64

The pg_class OID of the sequence with the object identity.

Source

pub fn sequences(&self) -> Result<Vec<CatalogSequenceMetadata>, SQLError>

Source

pub fn sequence_definitions( &self, ) -> Result<Vec<(RelationIdentity, SequenceState, RelationPersistence, SequenceSecurity)>, SQLError>

Sequence definitions with their persistence and security, for readers that show no value state.

Source

pub fn sequence_states( &self, ) -> Result<Vec<(RelationIdentity, SequenceState, RelationPersistence, SequenceSecurity)>, SQLError>

Sequence definitions with their persistence and security, each with the value state its latest committed value record holds, at the exact position a shared position records.

Source

pub fn sequence_is_visible_to( &self, security: &SequenceSecurity, role: &(impl RoleSubject + ?Sized), ) -> bool

Source

pub fn sequence_is_selectable_to( &self, security: &SequenceSecurity, role: &(impl RoleSubject + ?Sized), ) -> bool

Source

pub fn sequence_value_is_readable_to( &self, security: &SequenceSecurity, role: &(impl RoleSubject + ?Sized), ) -> bool

Source

pub fn sequence_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<CatalogSequenceSnapshot>, SQLError>

Source

pub fn schema_has_privilege_to( &self, schema: &str, role: &(impl RoleSubject + ?Sized), privilege: SchemaAclPrivilege, ) -> bool

Source

pub fn views_of_kind(&self, kind: StoredViewKind) -> Vec<(String, StoredView)>

Source

pub fn foreign_table_names(&self) -> Vec<String>

Source

pub fn foreign_tables(&self) -> Vec<(String, StoredForeignTable)>

Source

pub fn foreign_table_security( &self, name: &str, ) -> Result<TableSecurity, SQLError>

Source

pub fn catalog_indexes(&self) -> impl Iterator<Item = &CatalogIndexRow>

Source

pub fn triggers(&self) -> Vec<StoredTrigger>

Source

pub fn rules(&self) -> Vec<StoredRule>

Source

pub fn domain_snapshot(&self) -> Arc<BTreeMap<String, StoredDomain>> ⓘ

Share the captured domain allocation with static signature analysis.

Source

pub fn domains(&self) -> impl Iterator<Item = &StoredDomain>

Source

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

Source

pub fn shells(&self) -> impl Iterator<Item = &StoredShellType>

Source

pub fn ranges(&self) -> impl Iterator<Item = &StoredRange>

Source

pub fn composites(&self) -> impl Iterator<Item = &StoredComposite>

Source

pub fn composite_by_type_oid(&self, oid: u32) -> Option<&StoredComposite>

Resolve a standalone composite type by its type OID or by the OID of its generated array type.

Source

pub fn enum_by_type_oid(&self, oid: u32) -> Option<&StoredEnum>

Resolve an enum by its type OID or by the OID of its generated array type.

Source

pub fn sql_functions( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<Vec<Arc<SQLUserFunction>>>, SQLError>

Source

pub fn all_sql_functions(&self) -> Vec<Arc<SQLUserFunction>>

Source

pub fn table( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<&CatalogTableSnapshot>, SQLError>

Source

pub fn table_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<&CatalogTableSnapshot>, SQLError>

Source

pub fn table_name( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<String>, SQLError>

Source

pub fn table_name_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<String>, SQLError>

Source

pub fn hierarchy_scan_tables( &self, resolution: &RelationNameResolution, name: &str, include_descendants: bool, ) -> Result<Vec<String>, SQLError>

Source

pub fn direct_hierarchy_children( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Vec<String>, SQLError>

Source

pub fn table_has_rules( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<bool, SQLError>

Source

pub fn relation_has_triggers( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<bool, SQLError>

Source

pub fn partition_trigger_sources( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Vec<RelationIdentity>, SQLError>

Source

pub fn view_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<&StoredView>, SQLError>

Source

pub fn view_name_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<String>, SQLError>

Source

pub fn foreign_table_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<&StoredForeignTable>, SQLError>

Source

pub fn foreign_table_entry_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<(String, StoredForeignTable)>, SQLError>

Source§

impl CatalogReadView

Source

pub fn sql_function_by_oid( &self, oid: u32, ) -> Result<Option<&Arc<SQLUserFunction>>, SQLError>

Borrow a retained user routine by its catalog identity, sharing the generation’s existing OID lookup.

Source§

impl CatalogReadView

Source

pub fn new(snapshot: CatalogReadSnapshot) -> Self

Source

pub fn with_sequence_positions(self, positions: Arc<RowLockManager>) -> Self

Source

pub fn with_latest_sequence_values( self, values: Arc<dyn LatestSequenceValues>, ) -> Self

Source

pub fn with_prepared_catalog(self, catalog: Arc<dyn CatalogFacade>) -> Self

Source

pub fn snapshot(&self) -> &CatalogReadSnapshot

Source

pub fn with_physical_catalog(self, catalog: Arc<dyn CatalogFacade>) -> Self

Source

pub fn has_physical_catalog(&self) -> bool

Trait Implementations§

Source§

impl AnalysisCatalog for CatalogReadView

Source§

fn relation_row_type_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<CompositeTypeReference>>, SQLError>

Source§

fn sequence_exists_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<bool, SQLError>

Source§

fn virtual_relation_schema_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<VirtualRelationSchema>>, SQLError>

Source§

fn with_view_definition_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(ViewDefinitionRef<'_>) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Native catalogs lend one selected retained declaration; the default preserves ordinary catalog adapters.
Source§

fn with_foreign_table_columns_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, read: &mut dyn FnMut(&[ColumnDef]) -> Result<(), SQLError>, ) -> Result<(), SQLError>

Native catalogs lend column declarations without copying foreign options or unrelated metadata.
Source§

fn virtual_relation_columns_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<Vec<String>>>, SQLError>

Source§

fn relation_row_type( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<CompositeTypeReference>, SQLError>

The actual row type of a selected catalog relation. Anonymous query sources and catalog fixtures without identities leave this unavailable.
Source§

fn relation_dependency( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<u32>, SQLError>

The OID of a relation successfully selected in this same immutable namespace. The binder calls this after selecting a catalog relation, never for a CTE or an unsuccessful lookup candidate. Catalog fixtures without identities may leave this unavailable.
Source§

fn relation_dependency_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<u32>, SQLError>

Observe a selected relation identity within the caller’s planning control.
Source§

fn prepared_dependency_snapshot( &self, dependencies: &PreparedAnalysisDependencies, ) -> Result<Option<PreparedDependencySnapshot>, SQLError>

Exact revisions of the requested identities in this catalog view. Return None only when the catalog has no revision capability; within an available snapshot, include every requested identity and use a missing value for an absent object.
Source§

fn prepared_dependency_snapshot_with_control( &self, dependencies: &PreparedAnalysisDependencies, control: &ProductionControl<'_>, ) -> Result<Option<PreparedDependencySnapshot>, SQLError>

Source§

fn effective_search_path( &self, resolution: &RelationNameResolution, ) -> Result<Option<EffectiveSearchPath>, SQLError>

The schemas that exist and that the analyzing role may use, including implicit namespaces, and its creation namespace. Catalogs without namespace state leave this unavailable.
Source§

fn effective_search_path_with_control( &self, resolution: &RelationNameResolution, control: &ProductionControl<'_>, ) -> Result<Produced<Option<EffectiveSearchPath>>, SQLError>

Source§

fn table_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<TableDefinition>, SQLError>

Source§

fn table_resolved_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<TableDefinition>, SQLError>

Native implementations share already retained declarations and admit namespace lookup scratch before producing it.
Source§

fn table_name_resolved_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<String>>, SQLError>

Source§

fn table_name_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<String>, SQLError>

Source§

fn view_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<ViewDefinition>, SQLError>

Source§

fn foreign_table_resolved( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<TableDefinition>, SQLError>

Source§

fn sequence_exists( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<bool, SQLError>

Source§

fn virtual_relation_schema( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<Vec<(String, ColumnType)>>, SQLError>

Source§

fn sql_functions( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<Vec<Arc<SQLUserFunction>>>, SQLError>

Source§

fn unopenable_relation_with_control( &self, resolution: &RelationNameResolution, name: &str, control: &ProductionControl<'_>, ) -> Result<Option<Produced<UnopenableRelation>>, SQLError>

Source§

fn unopenable_relation( &self, resolution: &RelationNameResolution, name: &str, ) -> Result<Option<UnopenableRelation>, SQLError>

A relation that a query cannot open, such as a composite type’s relation: its unqualified name and the kind PostgreSQL’s detail names.
Source§

impl BuiltinRoutineSecurityCatalog for CatalogReadView

Source§

impl CatalogSnapshotSource for CatalogReadView

Source§

fn current_catalog_revision(&self) -> Option<u64>

A session-local revision covering all visible definition changes, including private DDL, rollback and refresh after a catalog lock wait. Sources without this guarantee must return None.
Source§

fn refresh_catalog(&self) -> Result<(), SQLError>

Refresh definitions without capturing a query view that definition coordination will discard.
Source§

fn current_catalog_snapshot(&self) -> CatalogReadView

Definition coordination uses the refreshed session catalog, independently from an ordinary query’s retained snapshot.
Source§

fn refreshed_catalog_snapshot(&self) -> Result<CatalogReadView, SQLError>

Source§

fn catalog_snapshot(&self) -> CatalogReadView

Source§

fn builtin_routine_permissions( &self, current_role: RoleReference, ) -> BuiltinRoutinePermissions

Capture builtin authority at the same boundary as ordinary catalog reads. Sources may use immutable authority inputs when they prove the existing unrestricted rule without table metadata.
Source§

fn bind_query_reads( &self, snapshot: CatalogReadView, ) -> Result<CatalogReadView, SQLError>

Attach the original query participant without replacing the retained catalog or observing unused sources.
Source§

fn retain_catalog_rows( &self, snapshot: CatalogReadView, ) -> Result<CatalogReadView, SQLError>

Retain direct catalog rows independently of name binding and SSI attribution.
Source§

impl Clone for CatalogReadView

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 PrivilegeCatalog for CatalogReadView

Source§

impl SystemRelationSecurityCatalog for CatalogReadView

Auto Trait Implementations§

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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<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> Same for T

Source§

type Output = T

Should always be Self
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.