大家好, 以下是JS-SDK的查询
query.find().then(function(results) {
return results;
});
返回的results中包含了对象的所有属性, 但是我想只获取某些属性(这样性能是否会好一些, 因为经过测试, 感觉一次获取所有属性的性能很慢)
find()方法, 是否支持这样, 传入要获取的列的名称:
find(['name', 'age'])
我查阅了JS-SDK的文档, 里面是这样描述的
find(options)
Retrieves a list of AVObjects that satisfy this query. Either options.success or options.error is called when the find completes.
Parameters:
{Object} options
A Backbone-style options object.
Returns:
{AV.Promise} A promise that is resolved with the results when the query completes.
感觉对options的解释太简略了, 用户基本无从了解options到底怎么用, A Backbone-style options object
能说明什么呢?
建议官方文档写得详细些
-
创建时间
16年6月29日
-
最后回复
16年6月30日
-
1
回复
-
1.1K
浏览
-
2
用户
-
1
链接