我写了一个脚本,它会因为“未定义行”而引发错误,但它似乎是正确的:
function myFunction(resourceIdentifiers,callback) {
dbconnection.execute( function(err,response) {
response.query('call SP_ExposePricingDetailforUI(' + resourceIdentifiers + ')',
function (err, rows, fields) {
callback(err, { rows: rows, fields: fields});
}
);
} );
return rows;
}
module.exports.myFunction = myFunction;