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

Method AllDatabaseNames

rest/server_context.go:413–423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

411}
412
413func (sc *ServerContext) AllDatabaseNames() []string {
414 sc._databasesLock.RLock()
415 defer sc._databasesLock.RUnlock()
416
417 names := make([]string, 0, len(sc._databases))
418 for name := range sc._databases {
419 names = append(names, name)
420 }
421 slices.Sort(names)
422 return names
423}
424
425func (sc *ServerContext) allDatabaseSummaries() []DbSummary {
426 sc._databasesLock.RLock()

Callers 5

getClusterUUIDMethod · 0.95
TestAllDatabaseNamesFunction · 0.95
handleAllDbsMethod · 0.80
handleGetConfigMethod · 0.80

Calls 3

RLockMethod · 0.80
RUnlockMethod · 0.80
SortMethod · 0.80

Tested by 2

TestAllDatabaseNamesFunction · 0.76