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

Method GetDatabaseCollectionWithUser

db/database.go:2200–2209  ·  view source on GitHub ↗

GetDatabaseCollectionWithUser returns a DatabaseCollectionWithUser if the collection exists on the database, otherwise error.

(scopeName, collectionName string)

Source from the content-addressed store, hash-verified

2198
2199// GetDatabaseCollectionWithUser returns a DatabaseCollectionWithUser if the collection exists on the database, otherwise error.
2200func (dbc *Database) GetDatabaseCollectionWithUser(scopeName, collectionName string) (*DatabaseCollectionWithUser, error) {
2201 collection, err := dbc.GetDatabaseCollection(scopeName, collectionName)
2202 if err != nil {
2203 return nil, err
2204 }
2205 return &DatabaseCollectionWithUser{
2206 DatabaseCollection: collection,
2207 user: dbc.user,
2208 }, nil
2209}
2210
2211// GetDatabaseCollection returns a collection if one exists, otherwise error.
2212func (dbc *DatabaseContext) GetDatabaseCollection(scopeName, collectionName string) (*DatabaseCollection, error) {

Calls 1

GetDatabaseCollectionMethod · 0.80