1pub mod block_offset_index;
4pub mod db_context;
5pub mod rope_helpers;
6pub mod rope_store;
7pub mod transactions;
8
9pub 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;