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

Method GetDefaultDatabaseCollection

db/database.go:2230–2236  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2228}
2229
2230func (dbc *DatabaseContext) GetDefaultDatabaseCollection() (*DatabaseCollection, error) {
2231 col, exists := dbc.CollectionByID[base.DefaultCollectionID]
2232 if !exists {
2233 return nil, fmt.Errorf("default collection is not configured on this database")
2234 }
2235 return col, nil
2236}
2237
2238// GetDefaultDatabaseCollectionWithUser will return the default collection if the default collection is supplied in the database config.
2239func (dbc *Database) GetDefaultDatabaseCollectionWithUser() (*DatabaseCollectionWithUser, error) {

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected