Skip to main content

KeyValueCatalog

Struct KeyValueCatalog 

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

Implementations§

Source§

impl KeyValueCatalog

Source

pub fn new(store: Arc<dyn KeyValueStore>) -> Self

Source

pub fn store(&self) -> Arc<dyn KeyValueStore>

Trait Implementations§

Source§

impl CatalogFacade for KeyValueCatalog

Source§

fn clear_path_index_data(&self, index: &str) -> StorageBackendResult<()>

Durable reachability records, paged lexicographically by (source, target). Building calls clear, bounded saves, then finish inside one transaction. Graph mutations invalidate the materialization atomically; definitions remain.
Source§

fn save_path_index_pairs( &self, index: &str, sequence: &str, pairs: &[(u64, u64)], ) -> StorageBackendResult<()>

Source§

fn finish_path_index_data( &self, index: &str, graph: &str, definition: &str, ) -> StorageBackendResult<()>

Source§

fn path_index_data_is_current( &self, index: &str, definition: &str, ) -> StorageBackendResult<bool>

Source§

fn path_index_pairs( &self, index: &str, sequence: &str, after: Option<(u64, u64)>, limit: usize, ) -> StorageBackendResult<Vec<(u64, u64)>>

Source§

fn graph_vertex(&self, id: u64) -> StorageBackendResult<Option<GraphVertexRow>>

Read one entity without loading any other graph payload.
Source§

fn graph_edge(&self, id: u64) -> StorageBackendResult<Option<EdgeRow>>

Source§

fn graph_entity_ids( &self, filter: GraphEntityFilter<'_>, after: Option<u64>, limit: usize, ) -> StorageBackendResult<Vec<u64>>

Read a bounded, strictly ascending identity page from the pinned storage snapshot. Filters must be applied before the page limit.
Source§

fn graph_entity_count( &self, filter: GraphEntityFilter<'_>, ) -> StorageBackendResult<u64>

Source§

fn graph_entity_max_id( &self, kind: GraphEntityKind, ) -> StorageBackendResult<Option<u64>>

Source§

fn graph_entity_memberships( &self, kind: GraphEntityKind, id: u64, ) -> StorageBackendResult<Vec<String>>

Source§

fn graph_has_membership( &self, kind: GraphEntityKind, id: u64, graph: &str, ) -> StorageBackendResult<bool>

Source§

fn set_metadata(&self, key: &str, value: &str) -> StorageBackendResult<()>

Source§

fn get_metadata(&self, key: &str) -> StorageBackendResult<Option<String>>

Source§

fn migrate_relation_namespace(&self) -> StorageBackendResult<()>

Atomically migrate the former flat relation namespace into typed, schema-owned catalog objects. Implementations must reject normalized or cross-kind collisions instead of merging either object.
Source§

fn save_schema_row(&self, schema: &SchemaRow) -> StorageBackendResult<()>

Source§

fn drop_schema(&self, name: &str) -> StorageBackendResult<()>

Source§

fn load_schema_rows(&self) -> StorageBackendResult<Vec<SchemaRow>>

Source§

fn save_table(&self, schema: &TableSchema) -> StorageBackendResult<()>

Source§

fn load_tables(&self) -> StorageBackendResult<Vec<TableSchema>>

Source§

fn drop_table(&self, name: &str) -> StorageBackendResult<()>

Source§

fn drop_table_and_data(&self, name: &str) -> StorageBackendResult<()>

Remove a table definition and every catalog/data row owned by it as one atomic catalog operation.
Source§

fn purge_table_data(&self, name: &str) -> StorageBackendResult<()>

Source§

fn rename_table_data(&self, from: &str, to: &str) -> StorageBackendResult<()>

Source§

fn drop_column_data( &self, table_name: &str, column_name: &str, ) -> StorageBackendResult<()>

Source§

fn rename_column_data( &self, table_name: &str, from: &str, to: &str, ) -> StorageBackendResult<()>

Source§

fn save_model(&self, name: &str, json: &str) -> StorageBackendResult<()>

Source§

fn load_models(&self) -> StorageBackendResult<Vec<(String, String)>>

Source§

fn load_model(&self, name: &str) -> StorageBackendResult<Option<String>>

Source§

fn drop_model(&self, name: &str) -> StorageBackendResult<()>

Source§

fn save_scoring_params( &self, name: &str, params_json: &str, ) -> StorageBackendResult<()>

Source§

fn load_scoring_params( &self, name: &str, ) -> StorageBackendResult<Option<String>>

Source§

fn load_all_scoring_params(&self) -> StorageBackendResult<Vec<(String, String)>>

Source§

fn drop_scoring_params(&self, name: &str) -> StorageBackendResult<()>

Source§

fn create_sequence_row( &self, sequence: &SequenceRow, ) -> StorageBackendResult<bool>

Source§

fn replace_sequence_row( &self, sequence: &SequenceRow, ) -> StorageBackendResult<bool>

Source§

fn rename_sequence_row( &self, from: &str, to: &str, ) -> StorageBackendResult<bool>

Atomically move one sequence catalog row and its shared relation claim while preserving object identity and physical value state.
Source§

fn drop_sequence_row(&self, name: &str) -> StorageBackendResult<bool>

Source§

fn load_sequence_rows(&self) -> StorageBackendResult<Vec<SequenceRow>>

Source§

fn reserve_sequence_values( &self, name: &str, object_id: [u8; 16], definition_generation: [u8; 16], ) -> StorageBackendResult<SequenceReservationResult>

Source§

fn set_sequence_value( &self, name: &str, object_id: [u8; 16], value: i64, called: bool, log_count: i64, ) -> StorageBackendResult<Option<i64>>

Source§

fn save_view(&self, view: &ViewRow) -> StorageBackendResult<()>

Source§

fn rename_view( &self, from: &RelationIdentity, to: &RelationIdentity, ) -> StorageBackendResult<bool>

Atomically move one view catalog row and its shared relation claim.
Source§

fn drop_view(&self, relation: &RelationIdentity) -> StorageBackendResult<bool>

Source§

fn load_views(&self) -> StorageBackendResult<Vec<ViewRow>>

Source§

fn save_named_graph(&self, name: &str) -> StorageBackendResult<()>

Source§

fn drop_named_graph(&self, name: &str) -> StorageBackendResult<()>

Source§

fn load_named_graphs(&self) -> StorageBackendResult<Vec<String>>

Source§

fn named_graph_exists(&self, name: &str) -> StorageBackendResult<bool>

Source§

fn save_vertex( &self, vertex_id: u64, label: &str, properties_json: &str, ) -> StorageBackendResult<()>

Source§

fn delete_vertex(&self, vertex_id: u64) -> StorageBackendResult<()>

Source§

fn load_vertices(&self) -> StorageBackendResult<Vec<(u64, String, String)>>

Source§

fn save_edge( &self, edge_id: u64, source_id: u64, target_id: u64, label: &str, properties_json: &str, ) -> StorageBackendResult<()>

Source§

fn delete_edge(&self, edge_id: u64) -> StorageBackendResult<()>

Source§

fn load_edges(&self) -> StorageBackendResult<Vec<EdgeRow>>

Source§

fn save_graph_membership( &self, entity_type: &str, entity_id: u64, graph_name: &str, ) -> StorageBackendResult<()>

Source§

fn delete_graph_membership( &self, entity_type: &str, entity_id: u64, graph_name: &str, ) -> StorageBackendResult<()>

Source§

fn delete_graph_membership_for_graph( &self, graph_name: &str, ) -> StorageBackendResult<()>

Source§

fn load_graph_memberships( &self, ) -> StorageBackendResult<Vec<(String, u64, String)>>

Source§

fn purge_orphan_graph_entities(&self) -> StorageBackendResult<()>

Source§

fn replace_named_graph( &self, graph_name: &str, snapshot: &GraphSnapshot, ) -> StorageBackendResult<()>

Source§

fn drop_named_graph_data(&self, graph_name: &str) -> StorageBackendResult<()>

Source§

fn save_analyzer( &self, name: &str, config_json: &str, ) -> StorageBackendResult<()>

Source§

fn drop_analyzer(&self, name: &str) -> StorageBackendResult<()>

Source§

fn load_analyzers(&self) -> StorageBackendResult<Vec<(String, String)>>

Source§

fn save_analyzer_revision( &self, name: &str, config_json: &str, descriptor_json: &str, ) -> StorageBackendResult<()>

Save a named definition’s resolved descriptor with its diagnostic configuration in the same transaction.
Source§

fn load_analyzer_descriptors( &self, ) -> StorageBackendResult<Vec<(String, String)>>

Resolved named descriptors; legacy definitions appear only in load_analyzers until migrated.
Source§

fn replace_table_field_analyzer_binding( &self, table: &str, field: &str, phase: &str, name: &str, binding_json: &str, ) -> StorageBackendResult<()>

Atomically replace a field’s complete independent binding and its compatibility label. An empty label denotes the physical field’s unnamed default.
Source§

fn load_table_field_analyzer_bindings( &self, ) -> StorageBackendResult<Vec<(String, String, String)>>

(table, field, binding JSON) rows. Each field has one complete binding envelope.
Source§

fn save_table_field_analyzer( &self, table_name: &str, field: &str, phase: &str, analyzer_name: &str, ) -> StorageBackendResult<()>

Source§

fn replace_table_field_analyzer( &self, table_name: &str, field: &str, phase: &str, analyzer_name: &str, ) -> StorageBackendResult<()>

Source§

fn drop_table_field_analyzer_field( &self, table_name: &str, field: &str, ) -> StorageBackendResult<()>

Source§

fn drop_table_field_analyzers( &self, table_name: &str, ) -> StorageBackendResult<()>

Source§

fn load_table_field_analyzers( &self, ) -> StorageBackendResult<Vec<(String, String, String, String)>>

Source§

fn save_foreign_server( &self, name: &str, fdw_type: &str, options_json: &str, ) -> StorageBackendResult<()>

Source§

fn drop_foreign_server(&self, name: &str) -> StorageBackendResult<()>

Source§

fn load_foreign_servers( &self, ) -> StorageBackendResult<Vec<(String, String, String)>>

Source§

fn save_foreign_table(&self, row: &ForeignTableRow) -> StorageBackendResult<()>

Source§

fn rename_foreign_table( &self, from: &RelationIdentity, to: &RelationIdentity, ) -> StorageBackendResult<bool>

Atomically move one foreign-table catalog row and its shared relation claim.
Source§

fn update_foreign_table_security( &self, relation: &RelationIdentity, role_owner: &str, acl: Option<&[TableAclEntry]>, column_acls: &BTreeMap<String, Vec<TableAclEntry>>, ) -> StorageBackendResult<bool>

Source§

fn drop_foreign_table( &self, relation: &RelationIdentity, ) -> StorageBackendResult<()>

Source§

fn load_foreign_tables(&self) -> StorageBackendResult<Vec<ForeignTableRow>>

Source§

fn save_catalog_index_row( &self, index: &CatalogIndexRow, ) -> StorageBackendResult<()>

Source§

fn drop_catalog_index( &self, relation: &RelationIdentity, ) -> StorageBackendResult<()>

Source§

fn drop_catalog_indexes_for_table( &self, table_name: &str, ) -> StorageBackendResult<()>

Source§

fn load_catalog_indexes(&self) -> StorageBackendResult<Vec<CatalogIndexRow>>

Source§

fn save_path_index( &self, graph_name: &str, label_sequences_json: &str, ) -> StorageBackendResult<()>

Source§

fn drop_path_index(&self, graph_name: &str) -> StorageBackendResult<()>

Source§

fn load_path_indexes(&self) -> StorageBackendResult<Vec<(String, String)>>

Source§

fn save_column_stats( &self, stats: ColumnStatsInput<'_>, ) -> StorageBackendResult<()>

Source§

fn replace_column_stats( &self, table_name: &str, stats: &[ColumnStatsInput<'_>], ) -> StorageBackendResult<()>

Atomically replace the complete statistics snapshot for one table. Implementations must leave the prior snapshot intact if any row fails.
Source§

fn load_column_stats( &self, table_name: &str, ) -> StorageBackendResult<Vec<ColumnStatsRow>>

Source§

fn delete_column_stats(&self, table_name: &str) -> StorageBackendResult<()>

Source§

fn initialize_storage(&self) -> StorageBackendResult<()>

Prepare durable catalog storage inside the backend’s owning initial-restore transaction. Already initialized catalogs may keep the default.
Source§

fn cache_revisions(&self) -> StorageBackendResult<Option<CatalogCacheRevisions>>

Read transactional cache generations without loading schemas or column statistics. Providers without change tracking use conservative reloads.
Source§

fn fts_storage_was_reset(&self) -> bool

Source§

fn save_schema(&self, name: &str) -> StorageBackendResult<()>

Source§

fn load_schemas(&self) -> StorageBackendResult<Vec<String>>

Source§

fn next_sequence_value( &self, name: &str, object_id: [u8; 16], ) -> StorageBackendResult<Option<i64>>

Compatibility allocation API for callers that do not retain a session cache. A cached reservation’s unused values are intentionally abandoned, just as when a PostgreSQL session disconnects.
Source§

fn load_named_graph_snapshot( &self, name: &str, ) -> StorageBackendResult<Option<GraphSnapshot>>

Explicit bulk snapshot/export of one named graph. The caller pins the storage transaction. Engine startup, sessions, and query handles use direct access methods instead of retaining this owned copy.
Source§

fn save_catalog_index( &self, relation: &RelationIdentity, index_type: &str, table_name: &str, columns_json: &str, parameters_json: &str, ) -> StorageBackendResult<()>

Source§

impl Clone for KeyValueCatalog

Source§

fn clone(&self) -> KeyValueCatalog

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

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> 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> 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.