Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
node-firebird
Advanced tools
Pure javascript and asynchronous Firebird client for Node.js
npm install node-firebird
fb = require("node-firebird");
var database = new fb.Database('127.0.0.1', 3050, db, 'SYSDBA', 'masterkey',
function(){
console.log("connected");
},
function(error){
console.log("can't connect");
}
);
database.execute("select cast(? as integer) from rdb$database", [123],
function (result) {
console.log(result.data)
}
);
The transaction automatically started and commited/rollbacked.
var tr;
function fail(err) {
tr.rollback();
console.log(err.status);
}
database.startTransaction(function(transaction) {
tr = transaction;
tr.execute("select cast(? as integer) from rdb$database", 123, function(result1) {
tr.execute("select cast(? as integer) from rdb$database", 456, function(result2) {
tr.commit(function(ret) {
console.log(result1.data[0]);
console.log(result2.data[0]);
}, fail)
}, fail);
}, fail);
})
Most async methods can trigger a callback and an error event, they are optionnals. If an error occur the error event will be called, if no error event is provided, the error will be sent to the callback event and you will have to check if the result is an error. An error object have a status property.
function CheckResult(obj) {
if (obj.status) {
throw new Error('oups')
}
}
database.startTransaction(function(transaction) {
transaction.execute("select cast(? as integer) from rdb$database", 123, function(result) {
transaction.commit(function(ret) { // commit in all situations for a single query
CheckResult(result); // error executing query ?
CheckResult(ret); // error commiting ?
console.log(result.data);
})
});
})
FAQs
Pure JavaScript and Asynchronous Firebird client for Node.js.
The npm package node-firebird receives a total of 4,589 weekly downloads. As such, node-firebird popularity was classified as popular.
We found that node-firebird demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.