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

Method Database

rest/server_context.go:2129–2135  ·  view source on GitHub ↗

For test use

(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

2127
2128// For test use
2129func (sc *ServerContext) Database(ctx context.Context, name string) *db.DatabaseContext {
2130 db, err := sc.GetDatabase(ctx, name)
2131 if err != nil {
2132 panic(fmt.Sprintf("Unexpected error getting db %q: %v", name, err))
2133 }
2134 return db
2135}
2136
2137func (sc *ServerContext) initializeGocbAdminConnection(ctx context.Context) error {
2138 base.ConsolefCtx(ctx, base.LevelInfo, base.KeyAll, "Initializing server admin connection...")

Callers 15

TestBlipStatsBasicFunction · 0.45
TestBlipStatsFastReportFunction · 0.45
handleChangesMethod · 0.45
invokeMethod · 0.45
updateResponseWriterMethod · 0.45
handleGetDocMethod · 0.45
handleBLIPSyncMethod · 0.45
TestNumAccessErrorsFunction · 0.45
TestChannelAccessChangesFunction · 0.45

Calls 1

GetDatabaseMethod · 0.95

Tested by 15

TestBlipStatsBasicFunction · 0.36
TestBlipStatsFastReportFunction · 0.36
TestNumAccessErrorsFunction · 0.36
TestChannelAccessChangesFunction · 0.36
TestAccessOnTombstoneFunction · 0.36
TestDynamicChannelGrantFunction · 0.36
TestPublicChannelFunction · 0.36