Answers for "node js firebird example"

0

node js firebird example

var options = {}; options.host = '127.0.0.1';options.port = 3050;options.database = 'database.fdb';options.user = 'SYSDBA';options.password = 'masterkey';options.lowercase_keys = false; // set to true to lowercase keysoptions.role = null;            // defaultoptions.pageSize = 4096;        // default when creating database 
Posted by: Guest on April-28-2021
0

node js firebird example

var sql1 = 'SELECT * FROM TBL_USER WHERE ID>' + Firebird.escape(1);var sql2 = 'SELECT * FROM TBL_USER WHERE NAME=' + Firebird.escape('Pe\'er');var sql3 = 'SELECT * FROM TBL_USER WHERE CREATED<=' + Firebird.escape(new Date());var sql4 = 'SELECT * FROM TBL_USER WHERE NEWSLETTER=' + Firebird.escape(true); // or db.escape() console.log(sql1);console.log(sql2);console.log(sql3);console.log(sql4);
Posted by: Guest on April-28-2021
0

node js firebird example

Firebird.attach(options, function(err, db) {     if (err)        throw err;     // db = DATABASE    db.query('INSERT INTO USERS (ID, ALIAS, CREATED) VALUES(?, ?, ?) RETURNING ID', [1, 'Pe\'ter', new Date()], function(err, result) {        console.log(result[0].id);        db.query('SELECT * FROM USERS WHERE Alias=?', ['Peter'], function(err, result) {            console.log(result);            db.detach();        });    });});
Posted by: Guest on April-28-2021
0

node js firebird example

const options = {...}; // Classic configuration with manager = trueFirebird.attach(options, function(err, svc) {    if (err)        return;    svc.backup(        {            database:'/DB/MYDB.FDB',            files: [                    {                     filename:'/DB/MYDB.FBK',                     sizefile:'0'                    }                   ]        },        function(err, data) {            data.on('data', line => console.log(line));            data.on('end', () => svc.detach());        }    );});
Posted by: Guest on April-28-2021
0

node js firebird example

Firebird.attach(options, function(err, db) {     if (err)        throw err;     // db = DATABASE    db.query('SELECT ID, ALIAS, USERPICTURE FROM USER', function(err, rows) {         if (err)            throw err;         // first row        rows[0].userpicture(function(err, name, e) {             if (err)                throw err;             // +v0.2.4            // e.pipe(writeStream/Response);             // e === EventEmitter            e.on('data', function(chunk) {                // reading data            });             e.on('end', function() {                // end reading                // IMPORTANT: close the connection                db.detach();            });        });     });});
Posted by: Guest on April-28-2021
0

node js firebird example

Firebird.attach(options, function(err, db) {     if (err)        throw err;     // db = DATABASE    db.transaction(Firebird.ISOLATION_READ_COMMITED, function(err, transaction) {        transaction.query('INSERT INTO users VALUE(?,?)', [1, 'Janko'], function(err, result) {             if (err) {                transaction.rollback();                return;            }             transaction.commit(function(err) {                if (err)                    transaction.rollback();                else                    db.detach();            });        });    });});
Posted by: Guest on April-28-2021
0

node js firebird example

AuthServer = Srp, Legacy_AuthWireCrypt = DisabledUserManager = Legacy_UserManager
Posted by: Guest on April-28-2021
0

node js firebird example

Firebird.attach(options, function(err, db) {     if (err)        throw err;     // db = DATABASE    db.query('SELECT * FROM TABLE', function(err, result) {        // IMPORTANT: close the connection        db.detach();    }); });
Posted by: Guest on April-28-2021
0

node js firebird example

var { GDSCode } = require('node-firebird/lib/gdscodes');/*...*/db.query('insert into my_table(id, name) values (?, ?)', [1, 'John Doe'],    function (err) {        if(err.gdscode == GDSCode.UNIQUE_KEY_VIOLATION){            console.log('constraint name:'+ err.gdsparams[0]);            console.log('table name:'+ err.gdsparams[0]);            /*...*/        }        /*...*/    }); 
Posted by: Guest on April-28-2021
0

node js firebird example

Firebird.attach(options, function(err, db) {     if (err)        throw err;     // db = DATABASE    // INSERT STREAM as BLOB    db.query('INSERT INTO USERS (ID, ALIAS, FILE) VALUES(?, ?, ?)', [1, 'Peter', fs.createReadStream('/users/image.jpg')], function(err, result) {        // IMPORTANT: close the connection        db.detach();    });});
Posted by: Guest on April-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language