pub struct ArrowGraphStore { /* private fields */ }Expand description
The core Arrow-native graph store, partitioned by namespace.
Each namespace holds a vector of RecordBatches (appended over time). Queries filter by namespace first, then by column predicates.
Implementations§
Source§impl ArrowGraphStore
impl ArrowGraphStore
Sourcepub fn add_triple(
&mut self,
triple: &Triple,
namespace: Namespace,
y_layer: YLayer,
) -> Result<String>
pub fn add_triple( &mut self, triple: &Triple, namespace: Namespace, y_layer: YLayer, ) -> Result<String>
Add a single triple to the specified namespace and Y-layer.
Sourcepub fn add_batch(
&mut self,
triples: &[Triple],
namespace: Namespace,
y_layer: YLayer,
) -> Result<Vec<String>>
pub fn add_batch( &mut self, triples: &[Triple], namespace: Namespace, y_layer: YLayer, ) -> Result<Vec<String>>
Add a batch of triples to the specified namespace and Y-layer. Returns the generated triple IDs.
Sourcepub fn query(&self, spec: &QuerySpec) -> Result<Vec<RecordBatch>>
pub fn query(&self, spec: &QuerySpec) -> Result<Vec<RecordBatch>>
Query triples matching the given spec.
Sourcepub fn delete(&mut self, triple_id: &str) -> Result<bool>
pub fn delete(&mut self, triple_id: &str) -> Result<bool>
Logically delete a triple by ID (sets deleted=true).
Sourcepub fn get_namespace_batches(&self, namespace: Namespace) -> &[RecordBatch]
pub fn get_namespace_batches(&self, namespace: Namespace) -> &[RecordBatch]
Get all RecordBatches for a given namespace (including deleted triples).
Sourcepub fn set_namespace_batches(
&mut self,
namespace: Namespace,
batches: Vec<RecordBatch>,
)
pub fn set_namespace_batches( &mut self, namespace: Namespace, batches: Vec<RecordBatch>, )
Replace all data for a namespace (used by checkout/restore).
Sourcepub fn causal_chain(&self, triple_id: &str) -> Vec<CausalNode>
pub fn causal_chain(&self, triple_id: &str) -> Vec<CausalNode>
Follow the caused_by/derived_from chain from a triple to build a derivation graph.
Returns a list of (triple_id, caused_by, derived_from) tuples representing
the full causal ancestry of the given triple. The first element is always the
queried triple itself. Traversal is breadth-first, following both caused_by
and derived_from links.