Inactive

Project Summary

  Analyzed 5 days ago based on code collected 5 days ago.

FBSQL Project Goalsfbsql aims at easing the use of Firebird and Interbase databases by providing clean client-libraries for different languages. The raw Firebird/Interbase-API is very awkward and hard to work with, while fbsql is easy and straight-forward like for example the sqlite- and mysql-APIs are. Currently C and Lisp are supported. fbsql uses IBPP, a C++ Interbase/Firebird API for it's implementation. It's basically just a thin wrapper around IBPP to make it accessible in C, and therefore in any other language.

Supported PlatformsCurrent Linux with GCC, Windows with mingw and Windows with Microsoft Visual Studio 2005 are tested. The code is rather portable, so I believe on every platform where the firebird client-library and IBPP are accessible, fbsql will work, too. As for the Lisp-library, I've only tested it with CLISP on Linux, yet. Again, this should be rather portable to most Lisp-implementations and platforms, too.

Example CodeHere's an example C-code which connects to a database and selects the IDs of the table "test":

#include "fbsql.h"
#include
#include

int main() {
struct fbsql_database *db;
struct fbsql_transaction *tr;
struct fbsql_statement *st;
int id;
db = fbsql_database_new("localhost","/pub/firebird/Test1.fdb","sysdba","5735","","iso8859_1","");
fbsql_database_connect(db);

tr = fbsql_transaction_new_with_defaults(db);
fbsql_transaction_start(tr);

st = fbsql_statement_new(db,tr);
fbsql_statement_prepare(st,"select id from test");
fbsql_statement_execute(st);
while(fbsql_statement_fetch(st)) {
if( fbsql_statement_get_integer(st, 1, &id) )
printf("ID: NULL\n");
else
printf("ID: %d\n",id);
}
fbsql_statement_close(st);
fbsql_statement_delete(st);
fbsql_transaction_rollback(tr);
fbsql_transaction_delete(tr);
fbsql_database_disconnect(db);
fbsql_database_delete(db);
return 0;
}DownloadI've added a "Sneak-Preview" download today, that's the base of what will be the first release. It should already be pretty usable, basic tests all worked out. Check it out at the download-page!

Share

In a Nutshell, fbsql...

Languages

C++
62%
C
28%
Lisp
7%
2 Other
3%
 
 

Lines of Code

 

Activity

30 Day Summary Apr 17 2013 — May 17 2013

12 Month Summary May 17 2012 — May 17 2013

Community

Ratings

Be the first to rate this project
 
Click to add your rating
 
Review this Project!
 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.