Skip to main content

GraphStorage

Struct GraphStorage 

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

Implementations§

Source§

impl GraphStorage

Source

pub fn offline_inspect_vertex_store( &self, vertices_dir: &Path, ) -> Result<String, StorageError>

Offline inspection of the vertex store under vertices_dir.

Read-only patrol entry for half-damaged stores: reuses the recovery path manifest decoding per label and validates baseline plus incremental epoch chain continuity. Returns a one-line summary; cleanup stays with startup recovery.

Source

pub fn dry_run_reshard_vertex_table( &self, label: u32, new_num_shards: usize, ) -> Result<VertexReshardDryRun, StorageError>

Read-only redistribution preview for one vertex label.

Runs the vertex dry-run precheck (target layout, pending schema fence, key shapes, target capacity, live distribution) plus an edge-reference census, without copying any row or switching the catalog. Edge partitions holding live edges that reference the label are reported, not refused, so the caller can choose the edge-free entry (drain first) or the edge-aware entry (translate through the produced map).

Source

pub fn offline_reshard_vertex_table( &self, label: u32, new_num_shards: usize, ) -> Result<usize, StorageError>

Offline redistribution of one vertex label to a new shard count.

The edge-free adjustment outlet for the shard-count change, run as five ordered steps: rebuild every live row into a fresh table, probe the rebuilt baseline on disk and health-check it, switch the catalog, force the checkpoint that makes the new state the durable baseline, verify the published baseline, then retire old snapshots. Any failure before the switch keeps the old table authoritative and names the failing step; online shard count changes stay rejected by the table manifest.

The tool holds the offline maintenance barrier itself, so no concurrent writes can tear the rebuild-swap sequence. Vertex IDs are rehashed and re-encoded, while edge endpoint IDs are not rewritten here: any live edge partition referencing this label (including wildcard label 0) refuses the rebuild so a graph is never silently mis-linked. Drain or migrate those edges first, or use Self::offline_reshard_vertex_table_with_edge_translation.

Source

pub fn offline_reshard_vertex_table_with_edge_translation( &self, label: u32, new_num_shards: usize, ) -> Result<usize, StorageError>

Edge-aware offline redistribution of one vertex label.

Same fence as the edge-free entry, but live edge references are translated instead of refused: the vertex rebuild produces the old-to-new internal id mapping, every edge partition referencing the label (including wildcard label 0) is remapped through the edge table’s own remap machinery, and the vertex swap plus edge rewrite commit as one unit under the held barrier while readers continue on their pre-tool snapshots. A forced checkpoint baseline is written before returning; an unwritten checkpoint counts as not done and the next open still sees the old baseline. The new baseline is health checked before the call reports success; any step failing keeps the old catalog entry authoritative with the failing step named.

Source

pub fn offline_bulk_import_vertices_str( &self, label: u32, rows: &[(String, Vec<(Arc<str>, Value)>)], ts: u64, sorted: bool, ) -> Result<usize, StorageError>

Offline bulk import into an empty vertex label.

Empty-table fast path for initial loads: capacity reserved once, rows applied under one lock hold per shard. Non-empty tables are rejected with guidance toward incremental batches. sorted declares strictly ordered unique keys, verified upfront.

Source

pub fn offline_bulk_import_vertices_i64( &self, label: u32, rows: &[(i64, Vec<(Arc<str>, Value)>)], ts: u64, sorted: bool, ) -> Result<usize, StorageError>

Integer-keyed offline bulk import. Same contract as Self::offline_bulk_import_vertices_str.

Source§

impl GraphStorage

Source

pub fn purge_expired_vertices( &self, space: &str, tag: &str, ) -> Result<usize, StorageError>

Source

pub fn purge_expired_edges( &self, space: &str, edge_type: &str, ) -> Result<usize, StorageError>

Source

pub fn purge_expired( &self, space: &str, target: Option<PurgeTarget<'_>>, ) -> Result<Vec<TtlPurgeEntry>, StorageError>

Physical-deletion entry point shared by the PURGE EXPIRED statement and maintenance callers.

target = None scans every TTL-configured tag and edge type in the space, returning one TtlPurgeEntry per such schema. target = Some(..) scans only that schema, returning its single entry (a schema that exists but has no TTL yields removed = 0; a schema that does not exist is an error).

Source§

impl GraphStorage

Source

pub const RECOMMENDED_BATCH_CHUNK_EDGES: usize = writer::RECOMMENDED_BATCH_CHUNK_EDGES

Recommended caller-side chunk size for very large edge batches.

One batch is one atomic unit holding the table lock for the whole apply; batches up to this size are the measured regime (see edge_group_commit_bench). Larger fanouts split via Self::chunk_edges_for_commit with one chunk per atomic commit.

Source

pub fn version_manager(&self) -> Arc<VersionManager> ⓘ

Return the MVCC manager used by this storage instance.

Source

pub fn write_gate_stats(&self) -> WriteGateStats

Cumulative auto-commit write-gate admission statistics (see context::WriteGateStats).

Source

pub fn chunk_edges_for_commit(edges: &[Edge]) -> Vec<&[Edge]>

Split an edge batch into caller-side chunks of at most Self::RECOMMENDED_BATCH_CHUNK_EDGES edges.

Each chunk commits atomically on its own through batch_insert_edges, keeping the per-commit lock-hold bounded under the single-writer discipline.

Source

pub fn outbox_pending(&self) -> u64

Outbox pending depth for backpressure-aware clients.

Source

pub fn begin_auto_commit_batch( &self, ) -> Result<Arc<AutoCommitBatchWindow>, StorageError>

Source

pub fn bind_auto_commit_statement( &self, window: &Arc<AutoCommitBatchWindow>, ) -> Result<GraphStorage, StorageError>

Source

pub fn finalize_auto_commit_batch( &self, window: &AutoCommitBatchWindow, ) -> Result<(), StorageError>

Source

pub fn begin_auto_commit_group( &self, ) -> Result<Arc<AutoCommitBatchWindow>, StorageError>

Source

pub fn finalize_auto_commit_group( &self, window: &AutoCommitBatchWindow, ) -> Result<(), StorageError>

Source

pub fn new() -> Result<GraphStorage, StorageError>

Source

pub fn new_with_config( config: PropertyGraphConfig, ) -> Result<GraphStorage, StorageError>

Create with a custom property graph configuration.

Source

pub fn new_with_path(path: PathBuf) -> Result<GraphStorage, StorageError>

Source

pub fn open(path: PathBuf) -> Result<GraphStorage, StorageError>

Open a persistent storage instance and load the on-disk state.

This is the entry point for production usage. It loads the persisted data first and then replays any remaining WAL entries if recovery is needed.

Source

pub fn open_with_config( path: PathBuf, property_config: PropertyGraphConfig, ) -> Result<GraphStorage, StorageError>

Open persistent storage with an explicit property graph configuration.

Source

pub fn open_with_persistence_config( path: PathBuf, config: PersistenceConfig, ) -> Result<GraphStorage, StorageError>

Open persistent storage using a fully specified persistence contract.

Recovery errors propagate: a manifest-listed file that is missing or corrupt refuses the open instead of serving a partially loaded table whose global IDs silently lost siblings.

Source

pub fn new_with_persistence( path: PathBuf, config: PersistenceConfig, ) -> Result<GraphStorage, StorageError>

Source

pub fn open_with_persistence( path: PathBuf, enable_wal: bool, sync_policy: Option<SyncPolicy>, ) -> Result<GraphStorage, StorageError>

Source

pub fn with_index_gc(self, config: IndexGcConfig) -> GraphStorage

Source

pub fn staged_wal_len(&self) -> usize

number of staged-WAL entries held for in-flight transactions. Auto-commit statements commit/remove their staged entries on write; an unbounded value indicates a lifecycle leak.

Source

pub fn retired_generation_count(&self) -> usize

total number of retired index generations awaiting reclamation.

Source

pub fn with_vertex_gc(self, config: VertexGcConfig) -> GraphStorage

Source

pub fn set_stats_manager(self, stats: Arc<StatsManager>) -> GraphStorage

Set the StatsManager for recording MVCC metrics.

This injects the stats manager into the GraphStorageContext, which will then automatically pass it to all EdgeTable instances for automatic metrics recording.

Source

pub fn is_persistence_enabled(&self) -> bool

Source

pub fn with_background_freeze(self) -> GraphStorage

Source

pub fn get_freeze_stats(&self) -> Option<FreezeStats>

Source

pub fn resource_snapshot(&self) -> ResourceSnapshot

Return current and peak memory usage by storage ownership category.

Source

pub fn wal_metrics(&self) -> Option<WalMetrics>

Return WAL durability positions and sync counters when WAL is enabled.

Source

pub fn check_snapshot_admission(&self) -> Result<(), StorageError>

Check whether another active snapshot may be registered.

Source

pub fn trigger_background_freeze(&self) -> Result<(), StorageError>

Source

pub fn trigger_background_maintenance(&self) -> Result<(), StorageError>

Run the background maintenance pass synchronously: automatic vertex compaction (ID hole reclamation, governed by PropertyGraphConfig::auto_compact) followed by delta freeze. Mainly for tests and explicit operator invocation.

Source

pub fn cleanup_old_checkpoints( &self, max_checkpoints: usize, ) -> Result<usize, StorageError>

Remove old published checkpoints while retaining the newest recovery points.

Source

pub fn split_native_index( &self, space: &str, index_name: &str, boundary: Vec<u8>, ) -> Result<(), StorageError>

Split one persistent native index at an ordered-key boundary.

The operation records a real MVCC snapshot and WAL start position, builds the new shard layout, then reads the committed WAL intents after the final publish barrier before installing the new generation.

Source

pub fn split_native_index_at_value( &self, space: &str, index_name: &str, value: &Value, ) -> Result<(), StorageError>

Split a native index at the beginning of one ordered property value.

Source§

impl GraphStorage

Direct vertex GC controls (outside StorageGcOps trait).

Source

pub fn is_vertex_gc_running(&self) -> bool

Source

pub fn start_vertex_gc(&self) -> Option<BackgroundTaskHandle>

Source

pub fn stop_vertex_gc(&self)

Source

pub fn register_schema_callback( &self, callback: Arc<dyn Fn(&SchemaChangeEvent) + Send + Sync>, ) -> u64

Register a schema-change observer (single shared registry: one subscription receives both table/space DDL and index DDL).

Source

pub fn unregister_schema_callback(&self, id: u64) -> bool

Remove a previously registered schema-change observer.

Source

pub fn schema_callback_count(&self) -> usize

Number of registered schema-change observers (diagnostics).

Source

pub fn shared_schema_callbacks( &self, ) -> Arc<EventSubscriptions<SchemaChangeEvent>> ⓘ

Shared schema-event registry for the central HookBus.

Source

pub fn register_storage_callback( &self, callback: Arc<dyn Fn(&StorageEvent) + Send + Sync>, ) -> Option<u64>

Register a storage-lifecycle observer on the persistence coordinator.

Returns None when no persistence coordinator is attached (e.g. pure in-memory mode); otherwise returns the subscription id, which can be passed to unregister_storage_callback.

Source

pub fn register_storage_callback_filtered( &self, callback: Arc<dyn Fn(&StorageEvent) + Send + Sync>, filter: Arc<dyn Fn(&StorageEvent) -> bool + Send + Sync>, ) -> Option<u64>

Register a filtered storage-lifecycle observer (only invoked when filter returns true). Returns None without a coordinator.

Source

pub fn unregister_storage_callback(&self, id: u64) -> bool

Remove a previously registered storage-lifecycle observer. Returns false when unknown or without a coordinator.

Source

pub fn storage_callback_count(&self) -> usize

Number of registered storage-lifecycle observers (diagnostics).

Source

pub fn shared_storage_callbacks( &self, ) -> Option<Arc<EventSubscriptions<StorageEvent>>>

Shared storage-event registry for the central HookBus. Returns None without an attached persistence coordinator.

Source

pub fn batch_delete_vertices( &self, label: u32, external_ids: &[&str], ts: u64, ) -> Result<usize, StorageError>

Batch delete vertices by external string IDs.

Source

pub fn batch_delete_vertices_by_i64( &self, label: u32, external_ids: &[i64], ts: u64, ) -> Result<usize, StorageError>

Batch delete vertices by external i64 IDs.

Source

pub fn batch_delete_vertices_with_edges( &self, space: &str, tag: &str, ids: &[VertexId], ) -> Result<usize, StorageError>

Batch-delete multiple vertices together with all their incident edges.

Trait Implementations§

Source§

impl AutoCommitBatchOps for GraphStorage

Source§

fn begin_auto_commit_batch( &self, ) -> Result<Arc<AutoCommitBatchWindow>, StorageError>

Source§

fn bind_auto_commit_statement( &self, window: &Arc<AutoCommitBatchWindow>, ) -> Result<GraphStorage, StorageError>

Source§

fn finalize_auto_commit_batch( &self, window: &AutoCommitBatchWindow, ) -> Result<(), StorageError>

Source§

fn bind_auto_commit_writer( &self, window: &Arc<AutoCommitBatchWindow>, ) -> Result<Box<dyn StorageWriter + '_>, StorageError>

Object-safe variant of Self::bind_auto_commit_statement: returns the bound statement storage as a boxed crate::StorageWriter carrying the window’s operation context (shared undo log in group mode), so writers behind a dyn QueryStorage handle can join the window. The default implementation is not_supported.
Source§

impl AutoCommitGroupOps for GraphStorage

Source§

fn begin_auto_commit_group( &self, ) -> Result<Arc<AutoCommitBatchWindow>, StorageError>

Open a group window (gate + shared snapshots + shared write timestamp).
Source§

fn finalize_auto_commit_group( &self, window: &AutoCommitBatchWindow, ) -> Result<(), StorageError>

Single group commit point: one fsync, barrier advance, one ts commit.
Source§

fn rollback_auto_commit_group( &self, window: &AutoCommitBatchWindow, ) -> Result<(), StorageError>

Roll back every statement bound to this group via its shared undo log, then release the window’s snapshots and gate. Default: not supported.
Source§

impl Clone for GraphStorage

Source§

fn clone(&self) -> GraphStorage

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 ColumnStatsReader for GraphStorage

Source§

fn vertex_column_stats( &self, space: &str, tag: &str, column: &str, ) -> Option<Arc<ColumnStatsSnapshot>>

Snapshot of one property column of tag inside space.
Source§

fn edge_column_stats( &self, space: &str, edge_type: &str, column: &str, ) -> Option<Arc<ColumnStatsSnapshot>>

Snapshot of one property column of edge_type inside space.
Source§

fn vertex_table_stats( &self, space: &str, tag: &str, ) -> Option<Arc<TableCardinalitySnapshot>>

Table-level cardinality of vertex tag tag inside space.
Source§

fn edge_table_stats( &self, space: &str, edge_type: &str, ) -> Option<Arc<TableCardinalitySnapshot>>

Table-level cardinality of edge type edge_type inside space. Read more
Source§

fn stats_epoch(&self) -> u64

Monotonic data-version stamp: changes whenever data has been written, independent of schema changes. Used by the optimizer’s statistics cache to detect stale estimates after DML. Read more
Source§

impl Debug for GraphStorage

Source§

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

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

impl StorageAdmin for GraphStorage

Source§

impl StorageAuthOps for GraphStorage

Source§

fn change_password(&mut self, info: &PasswordInfo) -> Result<bool, StorageError>

Source§

fn create_user(&mut self, info: &UserInfo) -> Result<bool, StorageError>

Source§

fn alter_user(&mut self, info: &UserAlterInfo) -> Result<bool, StorageError>

Source§

fn drop_user(&mut self, username: &str) -> Result<bool, StorageError>

Source§

fn user_exists(&self, username: &str) -> bool

Source§

fn list_users(&self) -> Vec<String>

Source§

fn get_user(&self, username: &str) -> Option<UserInfo>

Source§

fn update_last_login(&self, username: &str) -> Result<bool, StorageError>

Source§

fn list_user_roles(&self, username: &str) -> Vec<(i64, RoleType)>

Source§

fn list_all_user_roles(&self) -> Vec<(String, Vec<(i64, RoleType)>)>

Source§

fn grant_role( &mut self, username: &str, space_id: i64, role: RoleType, ) -> Result<bool, StorageError>

Source§

fn revoke_role( &mut self, username: &str, space_id: i64, ) -> Result<bool, StorageError>

Source§

impl StorageCommitOps for GraphStorage

Source§

impl StorageGcOps for GraphStorage

Source§

fn is_index_gc_running(&self) -> bool

Source§

fn start_index_gc(&self) -> Option<BackgroundTaskHandle>

Source§

fn stop_index_gc(&self)

Source§

impl StorageOperationContextOps for GraphStorage

Source§

fn bind_auto_commit_context(&self) -> Result<GraphStorage, StorageError>

Source§

fn bind_read_operation_context(&self) -> Result<GraphStorage, StorageError>

Bind a read-only statement context with a fixed snapshot timestamp. Read more
Source§

fn bind_operation_context( &self, context: StorageOperationContext, ) -> GraphStorage

Source§

fn operation_context(&self) -> Option<Arc<StorageOperationContext>>

Source§

fn finalize_operation(&self, committed: bool) -> Result<(), StorageError>

Finalize an operation-owned auto-commit timestamp. Read more
Source§

impl StoragePersistenceOps for GraphStorage

Source§

impl StorageReader for GraphStorage

Source§

fn get_vertex( &self, space: &str, tag: &str, id: &VertexId, ) -> Result<Option<Vertex>, StorageError>

Source§

fn layout_version(&self) -> u64

Monotonic physical layout version of the vertex/edge layout. Read more
Source§

fn vertex_id_domain(&self, space: &str) -> Option<Range<i64>>

Self-proven vertex-id domain covering a whole space. Read more
Source§

fn get_vertex_projected( &self, space: &str, tag: &str, id: &VertexId, projection: &[Arc<str>], ) -> Result<Option<Vertex>, StorageError>

Fetch a vertex with only the requested properties. Read more
Source§

fn scan_vertices(&self, space: &str) -> Result<Vec<Vertex>, StorageError>

Source§

fn scan_vertices_by_tag( &self, space: &str, tag: &str, ) -> Result<Vec<Vertex>, StorageError>

Source§

fn scan_vertices_by_tag_paginated( &self, space: &str, tag: &str, offset: usize, limit: usize, ) -> Result<Vec<Vertex>, StorageError>

Source§

fn scan_vertices_by_prop( &self, space: &str, tag: &str, prop: &str, value: &Value, ) -> Result<Vec<Vertex>, StorageError>

Source§

fn get_edge( &self, space: &str, src: &VertexId, dst: &VertexId, edge_type: &str, rank: i64, ) -> Result<Option<Edge>, StorageError>

Source§

fn get_edge_projected( &self, space: &str, src: &VertexId, dst: &VertexId, edge_type: &str, rank: i64, projection: &[Arc<str>], ) -> Result<Option<Edge>, StorageError>

Fetch an edge with only the requested properties. Read more
Source§

fn get_node_edges( &self, space: &str, node_id: &VertexId, direction: EdgeDirection, edge_types: &[String], ) -> Result<Vec<Edge>, StorageError>

Source§

fn get_node_edges_projected( &self, space: &str, node_id: &VertexId, direction: EdgeDirection, edge_types: &[String], projection: Option<&[Arc<str>]>, limit: Option<usize>, ) -> Result<Vec<Edge>, StorageError>

Filtered and projected per-node edge fanout. Read more
Source§

fn get_vertices_batch( &self, space: &str, tag: &str, ids: &[VertexId], ) -> Result<Vec<Option<Vertex>>, StorageError>

Batch vertex point lookups with the schema resolved once. Read more
Source§

fn get_vertices_projected_batch( &self, space: &str, tag: &str, ids: &[VertexId], projection: &[Arc<str>], ) -> Result<Vec<Option<Vertex>>, StorageError>

Batch vertex lookups decoding only the requested properties. Read more
Source§

fn neighbor_dst_ids_batch( &self, space: &str, src_ids: &[VertexId], direction: EdgeDirection, edge_types: &[String], ) -> Result<Vec<Vec<VertexId>>, StorageError>

Lightweight batch neighbor read used by de-materialized expand hops (id_only/count_only). Resolves the edge-type schema once for the batch and reads MVCC neighbors directly from the CSR, skipping EdgeRecord materialization and per-edge property decoding. Read more
Source§

fn out_degree_batch( &self, space: &str, src_ids: &[VertexId], direction: EdgeDirection, edge_types: &[String], ) -> Result<Vec<usize>, StorageError>

Batch out-degree read for count-only expand tails. Counts distinct edges per source id, in input order.
Source§

fn scan_edges_by_type( &self, space: &str, edge_type: &str, ) -> Result<Vec<Edge>, StorageError>

Source§

fn scan_edges_by_type_parallel( &self, space: &str, edge_type: &str, shards: usize, ) -> Result<Vec<Edge>, StorageError>

Table-sharded parallel variant of Self::scan_edges_by_type: the type’s edge tables fan out across shards rayon shards sharing one read timestamp, concatenated in key order. Single-table types fall back to the serial scan internally. The default body is the serial scan, so adapters and test doubles inherit it unchanged.
Source§

fn scan_all_edges(&self, space: &str) -> Result<Vec<Edge>, StorageError>

Source§

fn scan_edges_by_type_paginated( &self, space: &str, edge_type: &str, offset: usize, limit: usize, ) -> Result<Vec<Edge>, StorageError>

Scan edges of a specific type with pagination support. Returns at most limit edges starting from offset. The offset parameter is 0-based. The limit parameter controls the page size.
Source§

fn count_vertices_by_tag( &self, space: &str, tag: &str, ) -> Result<u64, StorageError>

Source§

fn count_edges_by_type( &self, space: &str, edge_type: &str, ) -> Result<u64, StorageError>

Source§

fn lookup_index( &self, space: &str, index_name: &str, value: &Value, ) -> Result<Vec<Value>, StorageError>

Source§

fn enable_edge_property_index( &self, space: &str, edge_type: &str, pool_capacity: u64, ) -> Result<bool, StorageError>

Enable the per-table edge property index for edge_type, building it from existing edge data. Returns true if the index was enabled.
Source§

fn has_edge_property_index( &self, space: &str, edge_type: &str, ) -> Result<bool, StorageError>

Whether the per-table edge property index is enabled for edge_type.
Source§

fn disable_edge_property_index( &self, space: &str, edge_type: &str, ) -> Result<(), StorageError>

Drop the per-table edge property index for edge_type.
Source§

fn lookup_edges_by_property_range( &self, space: &str, edge_type: &str, prop_name: &str, lower: Option<&Value>, upper: Option<&Value>, include_lower: bool, include_upper: bool, ) -> Result<Vec<Edge>, StorageError>

Look up edges of edge_type whose prop_name value falls within [lower, upper) using the per-table edge property index. Read more
Source§

fn get_vertex_with_schema( &self, space: &str, tag: &str, id: &Value, ) -> Result<Option<(TagInfo, Vec<u8>)>, StorageError>

Source§

fn get_edge_with_schema( &self, space: &str, edge_type: &str, src: &Value, dst: &Value, ) -> Result<Option<(EdgeTypeInfo, Vec<u8>)>, StorageError>

Source§

fn scan_vertices_with_schema( &self, space: &str, tag: &str, ) -> Result<Vec<(TagInfo, Vec<u8>)>, StorageError>

Source§

fn scan_edges_with_schema( &self, space: &str, edge_type: &str, ) -> Result<Vec<(EdgeTypeInfo, Vec<u8>)>, StorageError>

Source§

fn get_space(&self, space: &str) -> Result<Option<SpaceInfo>, StorageError>

Source§

fn get_space_by_id( &self, space_id: u64, ) -> Result<Option<SpaceInfo>, StorageError>

Source§

fn list_spaces(&self) -> Result<Vec<SpaceInfo>, StorageError>

Source§

fn get_space_id(&self, space: &str) -> Result<u64, StorageError>

Source§

fn space_exists(&self, space: &str) -> bool

Source§

fn get_tag( &self, space: &str, tag: &str, ) -> Result<Option<TagInfo>, StorageError>

Source§

fn list_tags(&self, space: &str) -> Result<Vec<TagInfo>, StorageError>

Source§

fn get_edge_type( &self, space: &str, edge_type: &str, ) -> Result<Option<EdgeTypeInfo>, StorageError>

Source§

fn list_edge_types( &self, space: &str, ) -> Result<Vec<EdgeTypeInfo>, StorageError>

Source§

fn get_tag_index( &self, space: &str, index_name: &str, ) -> Result<Option<Index>, StorageError>

Source§

fn list_tag_indexes(&self, space: &str) -> Result<Vec<Index>, StorageError>

Source§

fn get_edge_index( &self, space: &str, index_name: &str, ) -> Result<Option<Index>, StorageError>

Source§

fn list_edge_indexes(&self, space: &str) -> Result<Vec<Index>, StorageError>

Source§

fn get_vertex_version_history( &self, space: &str, tag: &str, ) -> Result<Option<LabelVersionHistory>, StorageError>

Schema version history queries Query version history for a specific vertex tag
Source§

fn get_edge_version_history( &self, space: &str, edge_type: &str, ) -> Result<Option<LabelVersionHistory>, StorageError>

Query version history for a specific edge type
Source§

fn get_vertex_schema_changes( &self, space: &str, tag: &str, from_version: u64, to_version: u64, ) -> Result<Vec<PropertyChange>, StorageError>

Get schema changes between two versions for a vertex tag
Source§

fn get_edge_schema_changes( &self, space: &str, edge_type: &str, from_version: u64, to_version: u64, ) -> Result<Vec<PropertyChange>, StorageError>

Get schema changes between two versions for an edge type
Source§

fn detect_vertex_breaking_changes( &self, space: &str, tag: &str, from_version: u64, to_version: u64, ) -> Result<Vec<PropertyChange>, StorageError>

Detect breaking changes between versions for a vertex tag
Source§

fn detect_edge_breaking_changes( &self, space: &str, edge_type: &str, from_version: u64, to_version: u64, ) -> Result<Vec<PropertyChange>, StorageError>

Detect breaking changes between versions for an edge type
Source§

fn create_vertex_cursor( &self, space: &str, options: &ScanOptions, ) -> Result<Box<dyn VertexCursor>, StorageError>

Create a lazy vertex scan cursor. Read more
Source§

fn create_edge_cursor( &self, space: &str, options: &ScanOptions, ) -> Result<Box<dyn EdgeCursor>, StorageError>

Create a lazy edge scan cursor. Read more
Source§

fn create_index_cursor( &self, plan: &IndexScanPlan, ) -> Result<Box<dyn IndexCursor<Row = IndexRow>>, StorageError>

Create an index cursor for the given index and predicate. Read more
Source§

fn list_migration_history( &self, space: &str, label: &str, is_edge: bool, ) -> Result<Vec<MigrationHistoryRecord>, StorageError>

Source§

fn get_applied_versions( &self, space: &str, label: &str, is_edge: bool, ) -> Result<Vec<u64>, StorageError>

Source§

fn record_migration_history( &self, record: MigrationHistoryRecord, ) -> Result<(), StorageError>

Source§

fn list_all_migration_history( &self, ) -> Result<Vec<MigrationHistoryRecord>, StorageError>

Source§

fn edge_types_ttl_active( &self, space: &str, edge_types: &[String], ) -> Result<bool, StorageError>

Whether any edge type reached by a topology fast path has TTL configured. Read more
Source§

fn resolve_edge_type_name( &self, space: &str, hash: u32, ) -> Result<Option<String>, StorageError>

Resolve an edge type name from the storage-level edge type hash. Read more
Source§

impl StorageRecoveryOps for GraphStorage

Source§

impl StorageSchemaContextOps for GraphStorage

Source§

impl StorageSchemaOps for GraphStorage

Source§

fn create_space(&mut self, space: &mut SpaceInfo) -> Result<bool, StorageError>

Source§

fn drop_space(&mut self, space: &str) -> Result<bool, StorageError>

Source§

fn clear_space(&mut self, space: &str) -> Result<bool, StorageError>

Source§

fn create_tag( &mut self, space: &str, tag: &TagInfo, ) -> Result<u32, StorageError>

Source§

fn create_tag_with_estimate( &mut self, space: &str, tag: &TagInfo, estimated_rows: Option<u64>, ) -> Result<u32, StorageError>

Source§

fn alter_tag( &mut self, space: &str, tag_name: &str, additions: Vec<PropertyDef>, deletions: Vec<String>, new_comment: Option<String>, ) -> Result<bool, StorageError>

Source§

fn rename_vertex_property( &mut self, label: u32, old_name: &str, new_name: &str, ) -> Result<(), StorageError>

Source§

fn rename_tag_property( &mut self, space: &str, tag: &str, old_name: &str, new_name: &str, ) -> Result<bool, StorageError>

Source§

fn rename_tag( &mut self, space: &str, old_name: &str, new_name: &str, ) -> Result<bool, StorageError>

Source§

fn drop_tag(&mut self, space: &str, tag: &str) -> Result<bool, StorageError>

Source§

fn create_edge_type( &mut self, space: &str, edge_type: &EdgeTypeInfo, ) -> Result<u32, StorageError>

Source§

fn alter_edge_type( &mut self, space: &str, edge_type_name: &str, additions: Vec<PropertyDef>, deletions: Vec<String>, new_comment: Option<String>, ) -> Result<bool, StorageError>

Source§

fn rename_edge_type( &mut self, space: &str, old_name: &str, new_name: &str, ) -> Result<bool, StorageError>

Source§

fn rename_edge_property( &mut self, space: &str, edge_type: &str, old_name: &str, new_name: &str, ) -> Result<bool, StorageError>

Source§

fn update_edge_endpoints( &mut self, space: &str, edge_type: &str, src_tag_name: &str, dst_tag_name: &str, ) -> Result<bool, StorageError>

Source§

fn drop_edge_type( &mut self, space: &str, edge_type: &str, ) -> Result<bool, StorageError>

Source§

fn create_tag_index( &mut self, space: &str, index: &Index, ) -> Result<bool, StorageError>

Source§

fn drop_tag_index( &mut self, space: &str, index_name: &str, ) -> Result<bool, StorageError>

Source§

fn rebuild_tag_index( &mut self, space: &str, index_name: &str, ) -> Result<bool, StorageError>

Source§

fn create_edge_index( &mut self, space: &str, index: &Index, ) -> Result<bool, StorageError>

Source§

fn drop_edge_index( &mut self, space: &str, index_name: &str, ) -> Result<bool, StorageError>

Source§

fn rebuild_edge_index( &mut self, space: &str, index_name: &str, ) -> Result<bool, StorageError>

Source§

impl StorageSnapshotOps for GraphStorage

Source§

impl StorageSyncContextOps for GraphStorage

Source§

impl StorageTtlPurgeOps for GraphStorage

Source§

fn start_ttl_purge(&self, interval: Duration)

Start the periodic purge sweep at interval; a zero interval leaves the sweep stopped. Repeated calls keep the running sweep.
Source§

fn stop_ttl_purge(&self)

Source§

fn is_ttl_purge_running(&self) -> bool

Source§

impl StorageWriter for GraphStorage

Source§

fn insert_vertex( &mut self, space: &str, vertex: Vertex, ) -> Result<VertexId, StorageError>

Source§

fn update_vertex( &mut self, space: &str, vertex: Vertex, ) -> Result<(), StorageError>

Source§

fn update_vertex_replace( &mut self, space: &str, vertex: Vertex, ) -> Result<(), StorageError>

Source§

fn delete_vertex( &mut self, space: &str, tag: &str, id: &VertexId, ) -> Result<(), StorageError>

Delete one vertex without touching its incident edges. The orphaned edge rows stay visible until repaired: prefer delete_vertex_with_edges for cascade deletes, or run repair_dangling_edges afterwards.
Source§

fn delete_vertex_with_edges( &mut self, space: &str, tag: &str, id: &VertexId, ) -> Result<(), StorageError>

Source§

fn batch_delete_vertices_with_edges( &mut self, space: &str, tag: &str, ids: &[VertexId], ) -> Result<usize, StorageError>

Source§

fn batch_insert_vertices( &mut self, space: &str, vertices: Vec<Vertex>, ) -> Result<Vec<VertexId>, StorageError>

Source§

fn batch_insert_vertices_with_split( &mut self, space: &str, vertices: Vec<Vertex>, auto_split: bool, ) -> Result<Vec<VertexId>, StorageError>

Minimal default: delegates when splitting is on and enforces the single-request limit when off. The engine override chunks by label.
Source§

fn insert_edge(&mut self, space: &str, edge: Edge) -> Result<(), StorageError>

Source§

fn update_edge(&mut self, space: &str, edge: Edge) -> Result<(), StorageError>

Source§

fn update_edge_replace( &mut self, space: &str, edge: Edge, ) -> Result<(), StorageError>

Source§

fn delete_edge( &mut self, space: &str, src: &VertexId, dst: &VertexId, edge_type: &str, rank: i64, ) -> Result<(), StorageError>

Source§

fn batch_insert_edges( &mut self, space: &str, edges: Vec<Edge>, ) -> Result<(), StorageError>

Source§

fn batch_delete_edges( &mut self, space: &str, deletes: &[EdgeDeleteKey], ) -> Result<usize, StorageError>

Source§

fn insert_vertex_data( &mut self, space: &str, info: &InsertVertexInfo, ) -> Result<bool, StorageError>

Source§

fn insert_edge_data( &mut self, space: &str, info: &InsertEdgeInfo, ) -> Result<bool, StorageError>

Source§

fn delete_vertex_data( &mut self, space: &str, tag: &str, vertex_id: &str, ) -> Result<bool, StorageError>

Source§

fn delete_edge_data( &mut self, space: &str, src: &str, dst: &str, rank: i64, ) -> Result<bool, StorageError>

Source§

fn update_data( &mut self, space: &str, space_id: u64, info: &UpdateInfo, ) -> Result<bool, StorageError>

Source§

impl UndoTarget for GraphStorage

Source§

fn delete_vertex_type(&self, label: u32) -> Result<(), UndoLogError>

Source§

fn delete_edge_type(&self, edge_key: EdgeKey) -> Result<(), UndoLogError>

Source§

fn delete_vertex( &self, vertex: VertexIdentifier, ts: u64, ) -> Result<(), UndoLogError>

Source§

fn delete_edge(&self, edge_ctx: EdgeDeletionContext) -> Result<(), UndoLogError>

Source§

fn restore_edge( &self, edge: EdgeIdentifier, properties: Vec<(Arc<str>, Value)>, ts: u64, ) -> Result<(), UndoLogError>

Restore an edge that was deleted by a transaction. Read more
Source§

fn undo_update_edge_property( &self, edge_id: EdgeIdentifier, col_id: ColumnId, value: Value, ts: u64, ) -> Result<(), UndoLogError>

Source§

fn revert_delete_edge( &self, edge_ctx: EdgeDeletionContext, ) -> Result<(), UndoLogError>

Source§

fn revert_delete_vertex_properties( &self, label_name: &str, prop_names: &[Arc<str>], ) -> Result<(), UndoLogError>

Source§

fn revert_delete_edge_properties( &self, src_label: &str, dst_label: &str, edge_label: &str, prop_names: &[Arc<str>], ) -> Result<(), UndoLogError>

Source§

fn revert_delete_vertex_label( &self, label_name: &str, ) -> Result<(), UndoLogError>

Source§

fn revert_delete_edge_label( &self, src_label: &str, dst_label: &str, edge_label: &str, ) -> Result<(), UndoLogError>

Source§

fn revert_rename_vertex_properties( &self, label: &str, current_names: &[Arc<str>], original_names: &[Arc<str>], ) -> Result<(), UndoLogError>

Source§

fn revert_rename_edge_properties( &self, src_label: &str, dst_label: &str, edge_label: &str, current_names: &[Arc<str>], original_names: &[Arc<str>], ) -> Result<(), UndoLogError>

Source§

fn staged_write_mark(&self, txn_id: TransactionId) -> Option<StagedWriteMark>

Capture this target’s staged-write boundary for txn_id. Read more
Source§

fn rollback_staged_writes( &self, txn_id: TransactionId, mark: StagedWriteMark, ) -> Result<(), UndoLogError>

Rewind staged writes of txn_id to a mark previously captured by Self::staged_write_mark. 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CatalogStore for T

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

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> GraphStore for T

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
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> QueryStorage for T

Source§

fn snapshot_handle(&self) -> Option<SnapshotHandle>

Snapshot handle bound to this storage handle, when the handle is bound to an operation context with a pinned read/write snapshot. Read more
Source§

fn export_space(&self, space: &str, path: &Path) -> Result<(), StorageError>

Export the given space to CSV files under path/<space_name>/. Read more
Source§

fn import_space(&mut self, space: &str, path: &Path) -> Result<(), StorageError>

Import a space from CSV files under path/<space_name>/. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> StorageClient for T

Source§

impl<T> StorageMaintenance for T

Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more