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

Function changesViewOptions

db/query.go:770–784  ·  view source on GitHub ↗
(channelName string, startSeq, endSeq uint64, limit int)

Source from the content-addressed store, hash-verified

768}
769
770func changesViewOptions(channelName string, startSeq, endSeq uint64, limit int) map[string]interface{} {
771 endKey := []interface{}{channelName, endSeq}
772 if endSeq == 0 {
773 endKey[1] = map[string]interface{}{} // infinity
774 }
775 optMap := map[string]interface{}{
776 "stale": false,
777 QueryParamStartKey: []interface{}{channelName, startSeq},
778 QueryParamEndKey: endKey,
779 }
780 if limit > 0 {
781 optMap[QueryParamLimit] = limit
782 }
783 return optMap
784}
785
786type EmptyResultIterator struct{}
787

Callers 1

QueryChannelsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected