What is SQLite++?

July 1, 2008

SQLite++ is a library that function as a wrapper for the SQLite3 database API. It is designed in a manner that the access to all data occurs transparently.

It comes with a number of classes, each one responsible to operate a data object abstraction. There is a Connection, Query, Table, Record, Recordset and Field object abstractions classes.

The intent of SQLite++ library is the give the user the power to access it’s data stored in a SQLite database without writing specific code for it and with a small memory footprint usage.


Talk is Cheap! Show me the code!

July 1, 2008

#include #include using namespace std; using namespace sqlitepp; int main(int argc, char* argv[]) { try { dbSqliteConnection connection("data.sq3"); dbSqliteTable table(connection, "users"); while (table.records.eof() != true) { cout << "ID......: " << table.records["id"].asString() << endl; cout << "Username: " << table.records["user"].asString() << endl; cout << "UID.....: " << table.records["uid"].asString() << endl; cout << "GID.....: " << table.records["gid"].asString() << endl; cout << "Name....: " << table.records["name"].asString() << endl; cout << endl; table.records.next(); }; } catch (const dbSqliteError& error) { error.print(); }; return 0; };

Bellow is the download link for the files of this sample program and instructions on how to build it. All you need to execute it is that the SQlite3 and SQLite++ library is installed.

Compilling
gcc -Wall -I/usr/include/sqlitepp -I/usr/include -g -c sqlitepp.cpp -o sqlitepp.o
gcc -g -o sqlitepp sqlitepp.o -L. -lsqlitepp

Download
example.tar.gz


Obtaining SQLite++

July 1, 2008

The SQLite++ source code could be obtained through our git repositorie in Gitorious or in the SourceForge with the bellow links:

Public Git Clone URL
git clone git://gitorious.org/sqlitepp/mainline.git sqlitepp

HTTP Git Clone URL
git clone http://git.gitorious.org/sqlitepp/mainline.git sqlitepp
(note that cloning over HTTP is slightly slower, but useful if you’re behind a firewall)

Releases
http://www.sourceforge.net/projects/sqlitecpp


Follow

Get every new post delivered to your Inbox.