pub struct Update {
pub base_iri: Option<Iri<String>>,
pub operations: Vec<GraphUpdateOperation>,
}Expand description
A parsed SPARQL update.
use spargebra::SparqlParser;
let update_str = "CLEAR ALL ;";
let update = SparqlParser::new().parse_update(update_str)?;
assert_eq!(update.to_string().trim(), update_str);
assert_eq!(update.to_sse(), "(update (clear all))");Fields§
§base_iri: Option<Iri<String>>The update base IRI.
operations: Vec<GraphUpdateOperation>The update operations.
Implementations§
Source§impl Update
impl Update
Sourcepub fn parse(
update: &str,
base_iri: Option<&str>,
) -> Result<Self, SparqlSyntaxError>
👎Deprecated since 0.4.0: Use SparqlParser::new().parse_update instead
pub fn parse( update: &str, base_iri: Option<&str>, ) -> Result<Self, SparqlSyntaxError>
Use SparqlParser::new().parse_update instead
Parses a SPARQL update with an optional base IRI to resolve relative IRIs in the query.
Sourcepub fn to_sse(&self) -> String
pub fn to_sse(&self) -> String
Formats using the SPARQL S-Expression syntax.
Trait Implementations§
impl Eq for Update
impl StructuralPartialEq for Update
Auto Trait Implementations§
impl Freeze for Update
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnsafeUnpin for Update
impl UnwindSafe for Update
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