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

Method AllDatabases

rest/server_context.go:470–478  ·  view source on GitHub ↗

AllDatabases returns a copy of the _databases map.

()

Source from the content-addressed store, hash-verified

468
469// AllDatabases returns a copy of the _databases map.
470func (sc *ServerContext) AllDatabases() map[string]*db.DatabaseContext {
471 sc._databasesLock.RLock()
472 defer sc._databasesLock.RUnlock()
473
474 databases := make(map[string]*db.DatabaseContext, len(sc._databases))
475
476 maps.Copy(databases, sc._databases)
477 return databases
478}
479
480type PostUpgradeResult map[string]PostUpgradeDatabaseResult
481

Callers 7

GetDatabaseMethod · 0.80
templateResourceMethod · 0.80
ContextMethod · 0.80
DatabaseContextMethod · 0.80
TestPostUpgradeFunction · 0.80
TestNoDBInCheckpointHashFunction · 0.80

Calls 3

RLockMethod · 0.80
RUnlockMethod · 0.80
CopyMethod · 0.45

Tested by 3

TestPostUpgradeFunction · 0.64
TestNoDBInCheckpointHashFunction · 0.64