我使用简单的代码在Firebird库"node-firebird“中进行顺序测试。它总是返回1行,但应该有很多行。
exports.sequentially = (select, db_con_options) => {
Firebird.attach(db_con_options, (err, db) => {
if (err)
console.log(err);
db.sequentially(select, function(row, index) {
console.log(row);
}, function(err) {
console.log(err);
db.detach();
});
});}我甚至在Stack Overflow上找到了示例,它看起来是一样的。有什么建议吗?它怎麽工作?
发布于 2018-08-17 16:52:21
解决方案:
依次有第三个参数" next“,在你调用它之后,你的sql语句将转到下一行。下面是一个示例:
db.sequentially( select, (row, index, next) => {
console.log(row);
next();
}https://stackoverflow.com/questions/51875145
复制相似问题