New database access library, libpqxx-object - Mailing list pgsql-hackers

From Roger Leigh
Subject New database access library, libpqxx-object
Date
Msg-id 87r80kh441.fsf@wrynose.whinlatter.uklinux.net
Whole thread Raw
List pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I've been using libpqxx to access a Postgres database for the last few
months, and I wrote a set of classes to wrap around libpqxx, which
gradually evolved into a small set of classes and class templates.
These allow database tables and rows of tables to be represented as
"real" C++ objects, which you can interact with using normal class
methods.

Basically, it's an abstraction layer to separate the SQL SELECT,
INSERT, UPDATE and DELETE commands from the user of the classes, so
the classes become "database aware": the user of the class doesn't
need to be aware of the database interaction going on under the hood.
Database relationships such as joins using foreign keys and table
inheritance may be expressed using C++ inheritance.

The "table" classes take a pqxx::Connection in their constructors and
an optional pqxx::Transaction (they can run in either transaction or
auto-commit modes).


The current version of the library is available from:
http://www.whinlatter.uklinux.net/libpqxx-object-0.1.0.tar.bz2
This includes an API reference and a short tutorial explaining how it
is intended to be used.  It's not yet completely perfect, but it does
its job.  I'm now looking at additional ways to wrap the functionality
of libpqxx.

Are there any similar libraries in existence (either for Postgres or
any other DBMS)?  (I'm looking to pinch some ideas ;-)


If it would be of interest, you are welcome to include this in your
libpqxx library, or as a separate project on GBorg (I'll relicense it
under the standard Postgres licence).


Regards,
Roger

- -- 
Roger Leigh
               Printing on GNU/Linux?  http://gimp-print.sourceforge.net/               GPG Public Key: 0x25BFB848.
Pleasesign and encrypt your mail.
 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQE/q3HiVcFcaSW/uEgRAnKVAJ4h0vD0TSlN05y22hCEQWs5a8hT1wCghOpJ
iB5hso1peIA1u/7u3mHp2GU=
=BdRn
-----END PGP SIGNATURE-----


pgsql-hackers by date:

Previous
From: Andriy Tkachuk
Date:
Subject: Re: what could cause this PANIC on enterprise 7.3.4 db?
Next
From: Bruce Momjian
Date:
Subject: Re: Experimental ARC implementation