text-document-common 1.5.4

Shared entities, database, events, and undo/redo infrastructure for text-document
Documentation
// Generated by Qleany v1.4.8 from database.tera

pub mod block_offset_index;
pub mod db_context;
pub mod rope_helpers;
pub mod rope_store;
pub mod transactions;

/// Active storage backend.
pub use self::rope_store::RopeStore as Store;

use anyhow::Result;
use std::sync::Arc;

pub trait CommandUnitOfWork {
    fn begin_transaction(&mut self) -> Result<()>;
    fn commit(&mut self) -> Result<()>;
    fn rollback(&mut self) -> Result<()>;
    fn create_savepoint(&self) -> Result<types::Savepoint>;
    fn restore_to_savepoint(&mut self, savepoint: types::Savepoint) -> Result<()>;
    fn store(&self) -> Arc<Store>;
}

pub trait QueryUnitOfWork {
    fn begin_transaction(&self) -> Result<()>;
    fn end_transaction(&self) -> Result<()>;
    fn store(&self) -> Arc<Store>;
}

use crate::types;