Skip to main content

common/
database.rs

1// Generated by Qleany v1.11.0 from database.tera
2
3pub mod db_context;
4pub mod hashmap_store;
5pub mod transactions;
6pub mod write_guard;
7use anyhow::Result;
8
9pub trait CommandUnitOfWork {
10    fn begin_transaction(&mut self) -> Result<()>;
11    fn commit(&mut self) -> Result<()>;
12    fn rollback(&mut self) -> Result<()>;
13    fn create_savepoint(&self) -> Result<types::Savepoint>;
14    fn restore_to_savepoint(&mut self, savepoint: types::Savepoint) -> Result<()>;
15}
16
17pub trait QueryUnitOfWork {
18    fn begin_transaction(&self) -> Result<()>;
19    fn end_transaction(&self) -> Result<()>;
20}
21
22use crate::types;