Skip to main content

common/
database.rs

1// Generated by Qleany v1.4.8 from database.tera
2
3pub mod block_offset_index;
4pub mod db_context;
5pub mod rope_helpers;
6pub mod rope_store;
7pub mod transactions;
8
9/// Active storage backend.
10pub use self::rope_store::RopeStore as Store;
11
12use anyhow::Result;
13use std::sync::Arc;
14
15pub trait CommandUnitOfWork {
16    fn begin_transaction(&mut self) -> Result<()>;
17    fn commit(&mut self) -> Result<()>;
18    fn rollback(&mut self) -> Result<()>;
19    fn create_savepoint(&self) -> Result<types::Savepoint>;
20    fn restore_to_savepoint(&mut self, savepoint: types::Savepoint) -> Result<()>;
21    fn store(&self) -> Arc<Store>;
22}
23
24pub trait QueryUnitOfWork {
25    fn begin_transaction(&self) -> Result<()>;
26    fn end_transaction(&self) -> Result<()>;
27    fn store(&self) -> Arc<Store>;
28}
29
30use crate::types;