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

Method GetKeyspaces

rest/utilities_testing.go:2504–2512  ·  view source on GitHub ↗

GetKeyspaces returns the names of all the keyspaces on the rest tester. Currently assumes a single database.

()

Source from the content-addressed store, hash-verified

2502
2503// GetKeyspaces returns the names of all the keyspaces on the rest tester. Currently assumes a single database.
2504func (rt *RestTester) GetKeyspaces() []string {
2505 db := rt.GetDatabase()
2506 var keyspaces []string
2507 for _, collection := range db.CollectionByID {
2508 keyspaces = append(keyspaces, getRESTKeyspace(rt.TB(), db.Name, collection))
2509 }
2510 sort.Strings(keyspaces)
2511 return keyspaces
2512}
2513
2514// GetDbCollections returns a lexicographically sorted list of collections on the database for compatibility with GetKeyspaces and getCollectionsForBLIP
2515func (rt *RestTester) GetDbCollections() []*db.DatabaseCollection {

Calls 3

GetDatabaseMethod · 0.95
TBMethod · 0.95
getRESTKeyspaceFunction · 0.85