pub struct Graph { /* private fields */ }Expand description
Thread-safe Oxigraph wrapper with SPARQL caching. Clone is cheap (shared store).
Implementations§
Source§impl Graph
impl Graph
pub fn new() -> Result<Self>
pub fn insert_turtle(&self, turtle: &str) -> Result<()>
pub fn insert_turtle_with_base( &self, turtle: &str, _base_iri: &str, ) -> Result<()>
pub fn insert_turtle_in(&self, turtle: &str, _graph_iri: &str) -> Result<()>
pub fn insert_quad(&self, s: &str, p: &str, o: &str) -> Result<()>
pub fn load_path<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub fn query_cached(&self, sparql: &str) -> Result<CachedResult>
pub fn query(&self, sparql: &str) -> Result<QueryResults>
pub fn query_with_prolog( &self, sparql: &str, prefixes: &BTreeMap<String, String>, base: Option<&str>, ) -> Result<QueryResults>
pub fn query_prepared(&self, q: &Query) -> Result<QueryResults>
Sourcepub fn quads_for_pattern(
&self,
s: Option<&Subject>,
p: Option<&NamedNode>,
o: Option<&Term>,
g: Option<&GraphName>,
) -> Result<Vec<Quad>>
pub fn quads_for_pattern( &self, s: Option<&Subject>, p: Option<&NamedNode>, o: Option<&Term>, g: Option<&GraphName>, ) -> Result<Vec<Quad>>
Typed pattern filter (no extra allocs).
pub fn clear(&self) -> Result<()>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Graph
impl !RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl !UnwindSafe for Graph
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