pub struct PostgresTransaction {
pub writable: bool,
}Expand description
A transaction for reading and writing statements in PostgreSQL.
Fields§
§writable: boolImplementations§
Source§impl PostgresTransaction
impl PostgresTransaction
pub async fn begin( _store: &PostgresStore, writable: bool, ) -> Result<Self, PostgresError>
pub fn is_writable(&self) -> bool
Trait Implementations§
Source§impl Debug for PostgresTransaction
impl Debug for PostgresTransaction
Source§impl ReadTransaction for PostgresTransaction
impl ReadTransaction for PostgresTransaction
type Error = PostgresError
type Term = HeapTerm
type Statement = Quad<HeapTerm>
type StatementPattern = QuadPattern<HeapTerm>
Source§fn match(
&self,
_pattern: impl Into<Self::StatementPattern>,
) -> impl Stream<Item = Result<Self::Statement, Self::Error>>
fn match( &self, _pattern: impl Into<Self::StatementPattern>, ) -> impl Stream<Item = Result<Self::Statement, Self::Error>>
Returns a stream of all statements matching the given statement pattern. Read more
Source§fn is_empty(&self) -> impl Future<Output = Result<bool, Self::Error>> + Send
fn is_empty(&self) -> impl Future<Output = Result<bool, Self::Error>> + Send
Returns
true if the store is empty (contains no statements). Read moreSource§fn contexts(&self) -> impl Stream<Item = Result<Self::Term, Self::Error>> + Send
fn contexts(&self) -> impl Stream<Item = Result<Self::Term, Self::Error>> + Send
Returns a stream of all context terms (graph names) in the store. Read more
Source§impl WriteTransaction for PostgresTransaction
impl WriteTransaction for PostgresTransaction
type Error = PostgresError
type Term = HeapTerm
type Statement = Quad<HeapTerm>
type StatementPattern = QuadPattern<HeapTerm>
Source§async fn rollback(self) -> Result<(), Self::Error>
async fn rollback(self) -> Result<(), Self::Error>
Aborts the transaction, discarding any changes. Read more
Source§async fn commit(self) -> Result<(), Self::Error>
async fn commit(self) -> Result<(), Self::Error>
Commits the transaction, applying all changes. Read more
Source§async fn clear(&mut self) -> Result<(), Self::Error>
async fn clear(&mut self) -> Result<(), Self::Error>
Clears all data from the store. Read more
Source§async fn insert(
&mut self,
_statement: impl Into<Self::Statement> + Send,
) -> Result<(), Self::Error>
async fn insert( &mut self, _statement: impl Into<Self::Statement> + Send, ) -> Result<(), Self::Error>
Inserts a statement into the store. Read more
Auto Trait Implementations§
impl Freeze for PostgresTransaction
impl RefUnwindSafe for PostgresTransaction
impl Send for PostgresTransaction
impl Sync for PostgresTransaction
impl Unpin for PostgresTransaction
impl UnsafeUnpin for PostgresTransaction
impl UnwindSafe for PostgresTransaction
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