pub struct Txn<'conn>(/* private fields */);Implementations§
Trait Implementations§
Source§impl<'conn> AdminEnt for Txn<'conn>
impl<'conn> AdminEnt for Txn<'conn>
Source§fn create_dyn(&self, ent: Box<dyn Ent>) -> Result<Id, DatabaseError>
fn create_dyn(&self, ent: Box<dyn Ent>) -> Result<Id, DatabaseError>
Create an entity from a boxed dynamic Ent. Read more
Source§fn update_dyn(&self, ent: Box<dyn Ent>) -> Result<(), DatabaseError>
fn update_dyn(&self, ent: Box<dyn Ent>) -> Result<(), DatabaseError>
Update an entity from a boxed dynamic Ent. Read more
fn find_edges_by_dest(&self, dest: Id) -> Result<Vec<Edge>, DatabaseError>
fn remove_edges_by_dest(&self, dest: Id) -> Result<(), DatabaseError>
Source§fn list_entities(
&self,
entity_type: &str,
cursor: Option<Id>,
limit: usize,
) -> Result<Vec<Box<dyn Ent>>, DatabaseError>
fn list_entities( &self, entity_type: &str, cursor: Option<Id>, limit: usize, ) -> Result<Vec<Box<dyn Ent>>, DatabaseError>
List entities of a specific type with cursor-based pagination. Read more
fn audit_ent_edges<E>(&self, id: u64) -> Result<(), AuditError>
fn fix_ent_edges<E>(self, id: u64) -> Result<(), AuditError>
Source§impl<'conn> QueryEdge for Txn<'conn>
impl<'conn> QueryEdge for Txn<'conn>
Source§fn find_edges(
&self,
source: Id,
query: EdgeQuery<'_>,
) -> Result<EdgeQueryResult, DatabaseError>
fn find_edges( &self, source: Id, query: EdgeQuery<'_>, ) -> Result<EdgeQueryResult, DatabaseError>
Find edges
Source§impl<'conn> Transactional for Txn<'conn>
impl<'conn> Transactional for Txn<'conn>
fn create_edge(&self, edge: EdgeValue) -> Result<(), DatabaseError>
fn delete(&self, id: Id) -> Result<(), DatabaseError>
fn update<T: Ent, F: FnOnce(&mut T), B: BorrowMut<T>>( &self, ent0: B, mutator: F, ) -> Result<bool, DatabaseError>
fn create<E: Ent>(&self, ent: E) -> Result<Id, DatabaseError>
fn commit(self) -> Result<(), DatabaseError>
Auto Trait Implementations§
impl<'conn> Freeze for Txn<'conn>
impl<'conn> !RefUnwindSafe for Txn<'conn>
impl<'conn> !Send for Txn<'conn>
impl<'conn> !Sync for Txn<'conn>
impl<'conn> Unpin for Txn<'conn>
impl<'conn> UnsafeUnpin for Txn<'conn>
impl<'conn> !UnwindSafe for Txn<'conn>
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