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

Method OnlyDefaultCollection

db/database.go:2185–2191  ·  view source on GitHub ↗

onlyDefaultCollection is true if the database is only configured with default collection.

()

Source from the content-addressed store, hash-verified

2183
2184// onlyDefaultCollection is true if the database is only configured with default collection.
2185func (dbCtx *DatabaseContext) OnlyDefaultCollection() bool {
2186 if len(dbCtx.CollectionByID) > 1 {
2187 return false
2188 }
2189 _, exists := dbCtx.CollectionByID[base.DefaultCollectionID]
2190 return exists
2191}
2192
2193// hasDefaultCollection is true if the database is configured with default collection
2194func (dbCtx *DatabaseContext) HasDefaultCollection() bool {

Calls

no outgoing calls