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

Function getViewStoreForDefaultCollection

db/design_doc.go:789–799  ·  view source on GitHub ↗
(dbContext *DatabaseContext)

Source from the content-addressed store, hash-verified

787}
788
789func 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}

Callers 4

GetDesignDocMethod · 0.85
PutDesignDocMethod · 0.85
DeleteDesignDocMethod · 0.85
QueryDesignDocMethod · 0.85

Calls 3

AsViewStoreFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected