gpt4 book ai didi

node.js - 如何计算node.js中谷歌数据存储中的记录(命名空间,种类)?

转载 作者:太空宇宙 更新时间:2023-11-03 22:31:09 30 4
gpt4 key购买 nike

我正在使用 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/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com