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

Method open_existing

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

Open an existing pristine database without the table-init write lock. Unlike [`open`](Self::open), this method skips the `begin_write()` + table-initialization transaction. It assumes all tables already exist (true for any database previously created by `open` or `init`). The returned `Pristine` supports [`write_txn`](Self::write_txn) and holds redb's exclusive process lock for its lifetime. Sk

(path: P)

Source from the content-addressed store, hash-verified

437 /// Returns an error if the database file doesn't exist, is corrupted,
438 /// or the ID-scan read transaction fails.
439 pub fn open_existing<P: AsRef<Path>>(path: P) -> PristineResult<Self> {
440 Self::open_existing_with_schema_check(path, true)
441 }
442
443 /// Open an existing database for repair without initializing tables or
444 /// requiring a completed PATH_CLAIMS schema.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected