Golang with couchbase integration issue

I am using golang with a couchbase integration component called go-couchbase. It allows you to connect to couchbase and fetch data. However, I am having the problem of sending the start key and passing the value and constraint using this API. Because the functionality was not found by me.

url: - github.com/couchbaselabs/go-couchbase

Please let me know any method for sending these values ​​to couchbase and getting the data?

+3


source to share


1 answer


This startup key is only mentioned once, as a parameter for the couhbase view :

// View executes a view.
//
// The ddoc parameter is just the bare name of your design doc without
// the "_design/" prefix.
//
// Parameters are string keys with values that correspond to couchbase
// view parameters. Primitive should work fairly naturally (booleans,
// ints, strings, etc...) and other values will attempt to be JSON
// marshaled (useful for array indexing on on view keys, for example).
//
// Example:
//
// res, err := couchbase.View("myddoc", "myview", map[string]interface{}{
// "group_level": 2,
// "start_key": []interface{}{"thing"},
// "end_key": []interface{}{"thing", map[string]string{}},
// "stale": false,
// })
func (b *Bucket) View(ddoc, name string, params map[string]interface{}) (ViewResult, error) {

      



I suppose skip

one (mentioned in Pagination with Couchbase ) is another parameter to add to params map[string]interface{}

.

+2


source







All Articles