我在Firebird 2.5中创建了以下事件
CREATE TRIGGER neworc FOR ORC AFTER INSERT POSITION 0
AS
BEGIN
POST_EVENT 'new_orc';
END我想知道是否有一种方法可以让我在节点应用程序中侦听此事件。我安装了node-firebird包并创建了下面的代码,但它不起作用。
Firebird.attach(options, function(err, db) {
if (err)
throw err;
db.on('new_orc', function(result) {
console.log(result);
});
});发布于 2021-07-15 20:41:05
node-firebird的文档没有提到火鸟事件。on函数似乎只适用于特定于node-firebird的连接事件(“附加、分离、行、结果、事务、提交、回滚、错误等”),而不适用于Firebird事件。
换句话说,看起来您不能使用node-firebird侦听Firebird事件。
https://github.com/asfernandes/node-firebird-drivers的驱动程序似乎支持事件(例如,参见this test),但这个库的文档严重不足。
https://stackoverflow.com/questions/68385326
复制相似问题