MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / Pristine

Class Pristine

atomic-core/src/pristine/txn/pristine.rs:219–227  ·  view source on GitHub ↗

The pristine database handle This is the main entry point for all database operations. It wraps a redb database and provides methods for creating transactions. # Example ```ignore let pristine = Pristine::open("path/to/pristine")?; // Read-only access let read_txn = pristine.read_txn()?; let view = read_txn.get_view("main")?; // Read-write access let mut write_txn = pristine.write_txn()?; let

Source from the content-addressed store, hash-verified

217/// write_txn.commit()?;
218/// ```
219pub struct Pristine {
220 db: PristineDatabase,
221 /// Counter for allocating node IDs
222 pub(crate) next_node_id: AtomicU64,
223 /// Counter for allocating view IDs
224 pub(crate) next_view_id: AtomicU64,
225 /// Counter for allocating inodes
226 pub(crate) next_inode: AtomicU64,
227}
228
229enum PristineDatabase {
230 Writable(Arc<Database>, SnapshotBackend),

Callers 15

fromMethod · 0.85
collect_tracked_filesFunction · 0.85
get_tracked_fileFunction · 0.85
fromMethod · 0.85
find_predecessor_edgeFunction · 0.85
emit_recorded_attributesFunction · 0.85
fromMethod · 0.85
fromMethod · 0.85
fromMethod · 0.85
output_file_to_bufferFunction · 0.85

Calls

no outgoing calls