pub struct GraphStore { /* private fields */ }Expand description
GraphStore provides persistent storage operations for RDF graphs.
This type wraps Oxigraph’s persistent storage capabilities, allowing graphs to be stored on disk using RocksDB.
§Examples
use ggen_core::graph::{Graph, GraphStore};
// Open or create a persistent store
let store = GraphStore::open("./data/store")?;
// Create a graph from the persistent store
let graph = store.create_graph()?;
// Use the graph normally
graph.insert_turtle(r#"
@prefix ex: <http://example.org/> .
ex:alice a ex:Person .
"#)?;
// Data is persisted to diskImplementations§
Source§impl GraphStore
impl GraphStore
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Create a new in-memory store.
Creates a new in-memory RDF store. This is similar to Graph::new() but
returns a GraphStore instead of a Graph, providing a consistent API
for store management.
Sourcepub fn create_graph(&self) -> Result<Graph>
pub fn create_graph(&self) -> Result<Graph>
Create a Graph wrapper from this store.
The returned Graph will use this persistent store for all operations. Multiple Graph instances can be created from the same store, and they will all share the same underlying data.
Auto Trait Implementations§
impl Freeze for GraphStore
impl !RefUnwindSafe for GraphStore
impl Send for GraphStore
impl Sync for GraphStore
impl Unpin for GraphStore
impl !UnwindSafe for GraphStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request