Skip to main content

Module triple_store

Module triple_store 

Source
Expand description

SimpleTripleStore — lightweight Arrow-native triple store.

Wraps ArrowGraphStore with a simplified API that doesn’t require explicit namespace/layer on every operation.

§Quick Start

use arrow_graph_core::triple_store::SimpleTripleStore;

let mut store = SimpleTripleStore::new();
let id = store.add("Alice", "knows", "Bob", 0.9, "test").unwrap();
assert_eq!(store.count(None, None, None), 1);

let results = store.query(Some("Alice"), None, None).unwrap();
assert_eq!(results.len(), 1);
assert_eq!(results[0].subject, "Alice");

store.remove(&id).unwrap();
assert_eq!(store.count(None, None, None), 0);

Structs§

SimpleTripleStore
Lightweight Arrow-native triple store.
StoreStats
Statistics about the store.
StoredTriple
A retrieved triple with all metadata.

Functions§

batches_to_stored_triples
Convert a slice of RecordBatches into a Vec of StoredTriple.
extract_stored_triple
Extract a StoredTriple from a RecordBatch at the given row index.