(dbContext *DatabaseContext)
| 787 | } |
| 788 | |
| 789 | func getViewStoreForDefaultCollection(dbContext *DatabaseContext) (sgbucket.ViewStore, error) { |
| 790 | dbCollection, err := dbContext.GetDefaultDatabaseCollection() |
| 791 | if err != nil { |
| 792 | return nil, err |
| 793 | } |
| 794 | vs, ok := base.AsViewStore(dbCollection.dataStore) |
| 795 | if !ok { |
| 796 | return nil, fmt.Errorf("%T is not a ViewStore", dbCollection.dataStore) |
| 797 | } |
| 798 | return vs, nil |
| 799 | } |
no test coverage detected