Firebird 3 API demo usage with Pascal

Adriano dos Santos Fernandes (on the Firebird Development list): “I just built an example of Firebird 3 API usage with FreePascal. As said earlier, working with input/output buffers directly in non-C/C++ is difficult. This requires auxiliary classes. The others things seem ok and easy to use. We need some new functions in the new API, for example, to convert.” status vectors to strings, but this is not specific to Pascal.

Nodejs Firebird driver version 0.5.1 is released with support for Service Manager functions

node-firebird 0.5.1 released with the following functions implemented for Service Manager:

backup
restore
fixproperties
serverinfo
database validation
commit transaction
rollback transaction
recover transaction
database stats
users infos
user actions (add modify remove)
get firebird file log
tracing

List of functions implemeted :

// each row : fctname : [params], typeofreturn
var fbsvc = {
    "backup" : { [ "options"], "stream" },
    "nbackup" : { [ "options"], "stream" },
    "restore" : { [ "options"], "stream" },
    "nrestore" : { [ "options"], "stream" },
    "setDialect": { [ "database","dialect"], "stream" },
    "setSweepinterval": { [ "database","sweepinterval"], "stream" },
    "setCachebuffer" : { [ "database","nbpagebuffers"], "stream" },
    "BringOnline" : { [ "database"], "stream" },
    "Shutdown" : { [ "database","shutdown","shutdowndelay","shutdownmode"], "stream" },
    "setShadow" : { [ "database","activateshadow"], "stream" },
    "setForcewrite" : { [ "database","forcewrite"], "stream" },
    "setReservespace" : { [ "database","reservespace"], "stream" },
    "setReadonlyMode" : { [ "database"], "stream" },
    "setReadwriteMode" : { [ "database"], "stream" },
    "validate" : { [ "options"], "stream" },
    "commit" : { [ "database", "transactid"], "stream" },
    "rollback" : { [ "database", "transactid"], "stream" },
    "recover" : { [ "database", "transactid"], "stream" },
    "getStats" : { [ "options"], "stream" },
    "getLog" : { [ "options"], "stream" },
    "getUsers" : { [ "username"], "object" },
    "addUser" : { [ "username", "password", "options"], "stream" },
    "editUser" : { [ "username", "options"], "stream" },
    "removeUser" : { [ "username","rolename"], "stream" },
    "getFbserverInfos" : { [ "options", "options"], "object" },
    "startTrace" : { [ "options"], "stream" },
    "suspendTrace" : { [ "options"], "stream" },
    "resumeTrace" : { [ "options"], "stream" },
    "stopTrace" : { [ "options"], "stream" },
    "getTraceList" : { [ "options"], "stream" },
    "hasActionRunning" : { [ "options"], "object"}
}

this is an example to use with stream and object

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);
        }); 
});

CodeIgniter 3 (php framework) includes support for Firebird

The Userguide of Codeigniter 3 (still Release Candidate) mentions that now has support for Firebird:

Added Interbase / Firebird database support via the ibase driver.

This means that the installation package CI 3 includes it, although you could previously use Firebird in CodeiIgniter 2 by the driver developed by Carlos García ( https://github.com/cgarciagl/Firebird-for-Codeigniter ) .

 

To see the rest of the new features of CodeIgniter 3 these are the addresses:

http://www.codeigniter.com/userguide3/

http://www.codeigniter.com/userguide3/changelog.html

We can confirm that CodeIgniter 2 is a stable platform where I ‘ve done development with very good results in the past.

I also put the direction of an article I wrote about using Firebird with CodeIgniter 2, in my blog:

http://albringas.com/noticias/detalle/3103/

 

ps: news via firebird.com.mx

1 90 91 92 93 94 207