GetDatabaseCollectionWithUser returns a DatabaseCollectionWithUser if the collection exists on the database, otherwise error.
(scopeName, collectionName string)
| 2198 | |
| 2199 | // GetDatabaseCollectionWithUser returns a DatabaseCollectionWithUser if the collection exists on the database, otherwise error. |
| 2200 | func (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. |
| 2212 | func (dbc *DatabaseContext) GetDatabaseCollection(scopeName, collectionName string) (*DatabaseCollection, error) { |