我正在使用go与couchbase集成组件,称为golang。它可以连接couchbase并检索数据。但是,我在用这个API发送开始键和跳过值和限制值时有问题。因为没有我自己找到的功能。
网址:- github.com/couchbaselabs/go-couchbase
请让我知道有什么方法将这些值发送到couchbase并检索数据?
发布于 2014-10-29 06:53:26
启动键只提到一次,作为参数设置为couhbase视图。
// 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) {我认为skip one (在“带耦合基的分页”中提到)只是要添加到params map[string]interface{}中的另一个参数。
https://stackoverflow.com/questions/26622651
复制相似问题