我的存储过程中有一个波纹管代码,但azure抛出异常 每当我具有真实条件的while循环时,“最大分配时间限制超过”。除非并且直到进行唯一验证,否则我不想继续执行。
if (field.validations.unique != undefined && field.validations.unique) {
var gotResponse = false;
var query = "select * from root r where r." + field.name + "='" + record[field.name] + "' AND r.obj_type = '" + record.obj_type + "'";
var isAccepted = collection.queryDocuments(collectionLink, query, {}, function (err, existingDocs, responseOptions) {
if (existingDocs.length > 0 && existingDocs[0].id != record.id) {
if (!record.error['unique'])
record.error['unique'] = [];
record.error['unique'].push(field.name);
}
gotResponse = true;
});
while(true){
if(gotResponse ) break;
}
}