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

Method DataStoreNames

db/database.go:2554–2567  ·  view source on GitHub ↗

DataStoreNames returns the names of all datastores connected to this database

()

Source from the content-addressed store, hash-verified

2552
2553// DataStoreNames returns the names of all datastores connected to this database
2554func (db *Database) DataStoreNames() base.ScopeAndCollectionNames {
2555 if db.Scopes == nil {
2556 return base.ScopeAndCollectionNames{
2557 base.DefaultScopeAndCollectionName(),
2558 }
2559 }
2560 var names base.ScopeAndCollectionNames
2561 for scopeName, scope := range db.Scopes {
2562 for collectionName := range scope.Collections {
2563 names = append(names, base.ScopeAndCollectionName{Scope: scopeName, Collection: collectionName})
2564 }
2565 }
2566 return names
2567}
2568
2569// GetCollectionIDs will return all collection IDs for all collections configured on the database
2570func (db *DatabaseContext) GetCollectionIDs() []uint32 {

Calls 1