()
| 2228 | } |
| 2229 | |
| 2230 | func (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. |
| 2239 | func (dbc *Database) GetDefaultDatabaseCollectionWithUser() (*DatabaseCollectionWithUser, error) { |
no test coverage detected