Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node js firebird example

fb.attach(_connection, function(err, svc) {    if (err)        return;    // all function that return a stream take two optional parameter    // optread => byline or buffer  byline use isc_info_svc_line and buffer use isc_info_svc_to_eof    // buffersize => is the buffer for service manager it can't exceed 8ko (i'm not sure)     svc.getLog({optread:'buffer', buffersize:2048}, function (err, data) {            // data is a readablestream that contain the firebird.log file            console.log(err);            data.on('data', function (data) {                console.log(data.toString());            });            data.on('end', function() {                console.log('finish');            });        });     // an other exemple to use function that return object    svc.getFbserverInfos(            {            "dbinfo" : true,            "fbconfig" : true,            "svcversion" : true,            "fbversion" : true,            "fbimplementation" : true,            "fbcapatibilities" : true,            "pathsecuritydb" : true,            "fbenv" : true,            "fbenvlock" : true,            "fbenvmsg" : true        }, {}, function (err, data) {            console.log(err);            console.log(data);        });}); 
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #node #js #firebird
ADD COMMENT
Topic
Name
7+1 =