我正在使用 gcloud npm 模块。提前致谢。
我尝试了很多,但什么也没得到。
最佳答案
您需要对该实体进行查询并计算结果。
var query = ds.createQuery('EntityKind');
ds.runQuery(query, function(err, entities, info){
if(err) {
// deal with error in here
}
var total = entities.length;
// You should check if there are more result
// and maybe run the query again until there are no more result
if (info.moreResults !== gcloud.datastore.NO_MORE_RESULTS) {
// More result
}
});
关于node.js - 如何计算node.js中谷歌数据存储中的记录(命名空间,种类)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37027614/