rdf_store/
write_transaction.rs1use rdf_model::{Statement, StatementPattern, Term};
4
5pub trait WriteTransaction {
7 type Error;
8 type Term: Term + Clone;
9 type Statement: Statement<Term = Self::Term>;
10 type StatementPattern: StatementPattern<Term = Self::Term>;
11
12 fn rollback(self) -> impl Future<Output = Result<(), Self::Error>>;
14
15 fn commit(self) -> impl Future<Output = Result<(), Self::Error>>;
17
18 fn clear(&mut self) -> impl Future<Output = Result<(), Self::Error>>;
20
21 fn insert(
23 &mut self,
24 statement: impl Into<Self::Statement> + Send,
25 ) -> impl Future<Output = Result<(), Self::Error>>;
26
27 fn remove(
29 &mut self,
30 statement: impl Into<Self::Statement> + Send,
31 ) -> impl Future<Output = Result<(), Self::Error>>;
32
33 fn delete(
35 &mut self,
36 pattern: impl Into<Self::StatementPattern> + Send,
37 ) -> impl Future<Output = Result<(), Self::Error>>;
38}