pub struct Update { /* private fields */ }Expand description
A SPARQL Update operation configured before execution (ADR-009).
Implementations§
Source§impl Update
impl Update
Sourcepub fn base_iri(self, base_iri: impl Into<String>) -> Result<Self>
pub fn base_iri(self, base_iri: impl Into<String>) -> Result<Self>
Sets the base IRI used while parsing the update.
Invalid IRIs return Error::InvalidRdf.
Sourcepub fn prefix(
self,
prefix_name: impl Into<String>,
prefix_iri: impl Into<String>,
) -> Result<Self>
pub fn prefix( self, prefix_name: impl Into<String>, prefix_iri: impl Into<String>, ) -> Result<Self>
Adds a default IRI prefix used while parsing the update.
Invalid IRIs return Error::InvalidRdf.
Sourcepub fn default_graph(self, graphs: impl IntoIterator<Item = GraphName>) -> Self
pub fn default_graph(self, graphs: impl IntoIterator<Item = GraphName>) -> Self
Restricts USING-style dataset default graphs when applicable.
Only SPARQL Update operations that expose USING datasets (for example
DELETE/INSERT) honor this. INSERT DATA / DELETE DATA return
Error::Unsupported at execute time if dataset configuration is set.
Sourcepub fn default_graph_as_union(self) -> Self
pub fn default_graph_as_union(self) -> Self
Treats the union of named graphs as the default graph for USING datasets.
Sourcepub fn cancellation_token(self, token: CancellationToken) -> Self
pub fn cancellation_token(self, token: CancellationToken) -> Self
Attaches a cooperative cancellation token (ADR-012).
Sourcepub fn execute(self, model: &Model) -> Result<()>
pub fn execute(self, model: &Model) -> Result<()>
Parses and executes the update against a model.
Execution holds the model write lock. On Fjall-backed models, the durable copy is resynced after a successful update with compensated inserts/deletes so a mid-sync failure restores the pre-update on-disk key set; memory is then reloaded from that snapshot.