MCPcopy Create free account
hub / github.com/couchbase/moss / OpenStoreCollection

Function OpenStoreCollection

store_api.go:335–349  ·  view source on GitHub ↗

-------------------------------------------------------- OpenStoreCollection returns collection based on a persisted store in a directory. Updates to the collection will be persisted. An empty directory starts an empty collection. Both the store and collection should be closed by the caller when

(dir string, options StoreOptions,
	persistOptions StorePersistOptions)

Source from the content-addressed store, hash-verified

333// empty directory starts an empty collection. Both the store and
334// collection should be closed by the caller when done.
335func OpenStoreCollection(dir string, options StoreOptions,
336 persistOptions StorePersistOptions) (*Store, Collection, error) {
337 store, err := OpenStore(dir, options)
338 if err != nil {
339 return nil, nil, err
340 }
341
342 coll, err := store.OpenCollection(options, persistOptions)
343 if err != nil {
344 store.Close()
345 return nil, nil, err
346 }
347
348 return store, coll, nil
349}
350
351// --------------------------------------------------------
352

Callers 15

openMossStoreMethod · 0.85
TestIteratorSingleDoneFunction · 0.85
TestOpenStoreCollectionFunction · 0.85
TestStoreNilValueFunction · 0.85
TestStoreSnapshotRevertFunction · 0.85
openStoreAndWriteNItemsFunction · 0.85
TestStoreCrashRecoveryFunction · 0.85
TestStoreLargeDeletionsFunction · 0.85

Calls 3

OpenStoreFunction · 0.85
OpenCollectionMethod · 0.80
CloseMethod · 0.65

Tested by 15

openMossStoreMethod · 0.68
TestIteratorSingleDoneFunction · 0.68
TestOpenStoreCollectionFunction · 0.68
TestStoreNilValueFunction · 0.68
TestStoreSnapshotRevertFunction · 0.68
openStoreAndWriteNItemsFunction · 0.68
TestStoreCrashRecoveryFunction · 0.68
TestStoreLargeDeletionsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…