[英]Node-firebird sequentially select doesn't work
I'm using simple code to test sequentially in Firebird lib "node-firebird".我使用简单的代码在 Firebird 库“node-firebird”中按顺序进行测试。 It always gives me back 1 row, but should be a lot of them.
它总是给我回 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();
});
});}
I found example even here on Stack Overflow and it looks like the same.我什至在 Stack Overflow 上找到了示例,它看起来是一样的。 Any suggestions?
有什么建议? How does it work?
它是如何工作的?
SOLUTION:解决方案:
sequentially have 3rd parameter "next" , after u call it out, ur sql statement will go to next row.依次有第三个参数 "next" ,在你调用它之后,你的 sql 语句将转到下一行。 Here is an example :
这是一个例子:
db.sequentially( select, (row, index, next) => {
console.log(row);
next();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.