MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / GetSingleDataStore

Method GetSingleDataStore

rest/utilities_testing.go:587–595  ·  view source on GitHub ↗

GetSingleDataStore will return a datastore if there is only one collection configured on the RestTester database.

()

Source from the content-addressed store, hash-verified

585
586// GetSingleDataStore will return a datastore if there is only one collection configured on the RestTester database.
587func (rt *RestTester) GetSingleDataStore() base.DataStore {
588 collection, _ := rt.GetSingleTestDatabaseCollection()
589 ds, err := rt.GetDatabase().Bucket.NamedDataStore(base.ScopeAndCollectionName{
590 Scope: collection.ScopeName,
591 Collection: collection.Name,
592 })
593 require.NoError(rt.TB(), err)
594 return ds
595}
596
597func (rt *RestTester) WaitForDoc(docid string) {
598 seq, err := rt.SequenceForDoc(docid)

Calls 4

GetDatabaseMethod · 0.95
TBMethod · 0.95
NamedDataStoreMethod · 0.45