pub struct NamedGraphTransaction { /* private fields */ }Expand description
Named graph transaction that extends ACID transactions with graph-specific operations
Implementations§
Source§impl NamedGraphTransaction
impl NamedGraphTransaction
Sourcepub fn id(&self) -> TransactionId
pub fn id(&self) -> TransactionId
Get the transaction ID
Sourcepub fn state(&self) -> TransactionState
pub fn state(&self) -> TransactionState
Get the transaction state
Sourcepub fn isolation(&self) -> IsolationLevel
pub fn isolation(&self) -> IsolationLevel
Get the isolation level
Sourcepub fn insert_into_graph(
&mut self,
graph: GraphName,
subject: Subject,
predicate: Predicate,
object: Object,
) -> Result<bool, OxirsError>
pub fn insert_into_graph( &mut self, graph: GraphName, subject: Subject, predicate: Predicate, object: Object, ) -> Result<bool, OxirsError>
Insert a quad into a named graph
Sourcepub fn delete_from_graph(
&mut self,
graph: GraphName,
subject: Subject,
predicate: Predicate,
object: Object,
) -> Result<bool, OxirsError>
pub fn delete_from_graph( &mut self, graph: GraphName, subject: Subject, predicate: Predicate, object: Object, ) -> Result<bool, OxirsError>
Delete a quad from a named graph
Sourcepub fn clear_graph(&mut self, graph: GraphName) -> Result<usize, OxirsError>
pub fn clear_graph(&mut self, graph: GraphName) -> Result<usize, OxirsError>
Clear all quads from a named graph
Sourcepub fn create_graph(&mut self, graph: NamedNode) -> Result<(), OxirsError>
pub fn create_graph(&mut self, graph: NamedNode) -> Result<(), OxirsError>
Create a new named graph
Sourcepub fn drop_graph(&mut self, graph: NamedNode) -> Result<(), OxirsError>
pub fn drop_graph(&mut self, graph: NamedNode) -> Result<(), OxirsError>
Drop a named graph
Sourcepub fn copy_graph(
&mut self,
_source: GraphName,
_destination: GraphName,
) -> Result<usize, OxirsError>
pub fn copy_graph( &mut self, _source: GraphName, _destination: GraphName, ) -> Result<usize, OxirsError>
Copy one graph to another atomically
Sourcepub fn move_graph(
&mut self,
source: GraphName,
destination: GraphName,
) -> Result<usize, OxirsError>
pub fn move_graph( &mut self, source: GraphName, destination: GraphName, ) -> Result<usize, OxirsError>
Move one graph to another atomically
Sourcepub fn add_graph(
&mut self,
_source: GraphName,
_destination: GraphName,
) -> Result<usize, OxirsError>
pub fn add_graph( &mut self, _source: GraphName, _destination: GraphName, ) -> Result<usize, OxirsError>
Add (merge) one graph into another atomically
Sourcepub fn graph_stats(&self, graph: &GraphName) -> Option<GraphStats>
pub fn graph_stats(&self, graph: &GraphName) -> Option<GraphStats>
Get statistics about operations on a specific graph
Sourcepub fn modified_graphs(&self) -> Vec<GraphName>
pub fn modified_graphs(&self) -> Vec<GraphName>
Get all graphs modified in this transaction
Sourcepub fn lock_graph(&mut self, graph: GraphName) -> Result<(), OxirsError>
pub fn lock_graph(&mut self, graph: GraphName) -> Result<(), OxirsError>
Acquire a lock on a graph (for serializable isolation)
Sourcepub fn commit(self) -> Result<(), OxirsError>
pub fn commit(self) -> Result<(), OxirsError>
Commit the transaction
Sourcepub fn rollback(self) -> Result<(), OxirsError>
pub fn rollback(self) -> Result<(), OxirsError>
Rollback the transaction (abort)
Auto Trait Implementations§
impl Freeze for NamedGraphTransaction
impl RefUnwindSafe for NamedGraphTransaction
impl Send for NamedGraphTransaction
impl Sync for NamedGraphTransaction
impl Unpin for NamedGraphTransaction
impl UnsafeUnpin for NamedGraphTransaction
impl UnwindSafe for NamedGraphTransaction
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more