pub struct ContentStore { /* private fields */ }Expand description
Wraps Oxigraph Store, providing named-graph-aware RDF operations.
No other crate should import oxigraph directly.
Implementations§
Source§impl ContentStore
impl ContentStore
Sourcepub fn insert_triple_into(
&self,
subject: &str,
predicate: &str,
object: &ObjectValue,
graph: &str,
) -> Result<(), Box<dyn Error>>
pub fn insert_triple_into( &self, subject: &str, predicate: &str, object: &ObjectValue, graph: &str, ) -> Result<(), Box<dyn Error>>
Insert a triple into the specified named graph.
Sourcepub fn query_to_json(&self, sparql: &str) -> Result<Value, Box<dyn Error>>
pub fn query_to_json(&self, sparql: &str) -> Result<Value, Box<dyn Error>>
Execute a SPARQL SELECT or ASK query and return results as JSON.
Sourcepub fn load_turtle(&self, path: &Utf8Path) -> Result<(), Box<dyn Error>>
pub fn load_turtle(&self, path: &Utf8Path) -> Result<(), Box<dyn Error>>
Load a Turtle (.ttl) file into the default graph.
Sourcepub fn load_turtle_into(
&self,
path: &Utf8Path,
graph: &str,
) -> Result<(), Box<dyn Error>>
pub fn load_turtle_into( &self, path: &Utf8Path, graph: &str, ) -> Result<(), Box<dyn Error>>
Load a Turtle (.ttl) file into a specific named graph.
Sourcepub fn export_search_ntriples(&self) -> Result<String, Box<dyn Error>>
pub fn export_search_ntriples(&self) -> Result<String, Box<dyn Error>>
Export search-relevant triples as N-Triples for client-side SPARQL search.
Includes only predicates useful for search: name, description, date, URL, keywords, and rdf:type. The output can be loaded into oxigraph’s WASM build in the browser.
Trait Implementations§
Source§impl Clone for ContentStore
impl Clone for ContentStore
Source§fn clone(&self) -> ContentStore
fn clone(&self) -> ContentStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContentStore
impl !RefUnwindSafe for ContentStore
impl Send for ContentStore
impl Sync for ContentStore
impl Unpin for ContentStore
impl UnsafeUnpin for ContentStore
impl !UnwindSafe for ContentStore
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