I am trying to implement the continuation tokens in an async function with Azure table storage,
Below is my code,
async function acceleration_threshold1_exceed(carId){
PartitionKey = carId + "_" + "acceleration_threshold1_exceed";
return new Promise((resolve, reject) => {
query = new azure.TableQuery()
.select(['*'])
.where('PartitionKey eq?', PartitionKey);
tableSvc.queryEntities('eventsdata',query,null, function (error, result){
if(!error){
if(result.entries.length != 0){
resolve(result.entries.length);
}else{
reject(NaN);
}
}else{
reject(error);
}
});
});
}
module.exports = {
acceleration_threshold1_exceed
}