我正在尝试使用游标来访问大型结果集,但似乎无法让它们工作(即无限滚动)。以下是我到目前为止的代码,其中cursor是一个全局存储的字符串:
var options = {
type: "users",
client: myClient,
qs:{
ql:"location within " + distance + " of " + geo.lat + ", " + geo.lon,
limit:25,
cursor:cursor
}
},
var entities = new Apigee.Collection( options );
entities.fetch( function ( error, response ) {
if (error) {
//error
} else {
//success
populateEntityList( response );
}
});当我检查网络流量时,我发现游标从未被传递过。有人能给我指个解决方案吗?
发布于 2016-03-23 06:23:00
查看源代码(https://github.com/usergrid/usergrid/blob/master/sdks/html5-javascript/usergrid.js ln 2004):
this._cursor = options.cursor因此,您似乎需要将光标设置为options的属性,而不是qs的子属性:
var options = {
type: "users",
client: myClient,
qs:{
ql:"location within " + distance + " of " + geo.lat + ", " + geo.lon,
limit:25
},
cursor:cursor
}https://stackoverflow.com/questions/36143886
复制相似问题