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

Method open

atomic-repository/src/redb_change_store/mod.rs:279–281  ·  view source on GitHub ↗

Open or create a redb change store at the given path. Creates all required tables on first use. Subsequent opens use the existing tables. # Arguments `path` - Path to the redb database file, created if missing. Use [`open_existing`](Self::open_existing) for a repository database so a missing or not-yet-merged repository is never replaced by an empty one. # Errors Returns an error if the datab

(path: P)

Source from the content-addressed store, hash-verified

277 ///
278 /// Returns an error if the database cannot be opened or tables cannot be created.
279 pub fn open<P: AsRef<Path>>(path: P) -> RedbStoreResult<Self> {
280 Self::from_database(Arc::new(Database::create(path)?))
281 }
282
283 /// Open the store in an existing database file without creating it.
284 ///

Callers 1

open_existingMethod · 0.45

Calls 1

createFunction · 0.50

Tested by

no test coverage detected