【发布时间】:2021-04-10 05:38:13
【问题描述】:
正如我们看到的那样,我过滤了结果,所以我得到了 gps_speed > 150 的行, 但我得到的 gps_speed 等于 (25,24,27,...), 我想也许资源管理器有一个错误,所以我输入脚本来做同样的工作仍然得到相同的结果
async function speed1Query(carId,continuationToken){
speed = "150"
return new Promise((resolve ,reject)=>{
query = new azure.TableQuery()
.select(['*'])
.where('gps_speed gt ?',speed);
tableSvc.queryEntities('eventsdata', query, continuationToken, (error, results)=> {
if(!error){
resolve(results);
}else{
reject(error);
}
});
})
}
async function speed1(carId){
var continuationToken = null;
do{
var results = await speed1Query(carId, continuationToken);
continuationToken = results.continuationToken;
}
while(continuationToken!=null);
return results;
}
async function show(){
result1 = await speed1("1");
console.log(result1.entries.length);
}
这是我运行代码时得到的结果
247
与 Azure Explorer 返回的行数相同。
【问题讨论】:
-
“速度”属性的数据类型是什么?
标签: node.js azure azure-table-storage