Boost logo

Boost :

Subject: Re: [boost] SQL client library ?
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-09-06 05:48:04

Hi Joel,
----- Original Message -----
From: "joel" <joel.falcou_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, September 06, 2009 11:14 AM
Subject: Re: [boost] SQL client library ?

Jean-Louis Leroy wrote:
> 2. It looks like the options they are considering for a syntax are
> mainly inspired by Soci and pqxx. They have this in common : the query
> is expressed as SQL text (à la Boost.Regex) that is parsed at run time
> instead of using language constructs (à la Boost.Xpressive) that can
> be checked at compile time. This is error prone : you can pass illegal
> SQL ; and the returned values will incur runtime typecasting, which
> may fail at run time in case of mismatch.
Back at Boost'Con 09 I proposed a function based and not text based SQL
interface using proto that looked like :

#include <boost/rdb_proto/rdb.hpp>


int main()
  connection db("some.db.url","login","passwd");

  BOOST_RDB_TABLE((id)(name)(age)) employee("employee",db);
  BOOST_RDB_RESULT_SET((age)(name)) rows;

  rows = select(age,name).from(employee)
                                           .where( age > 45 && name
~= "Dil%" );

  // Some random access
  if( !r.empty() )
    cout << r[0][name] << " is "
         << r[0][age] << " years old." << endl;

I have the whole ppt of my proposal somewhere if soemone's interested.
I have alas not much free time for this but I had some prototype code
laying somewhere

Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35
Unsubscribe & other changes:
I'm interested on your proposal. Could you share your prototype and the slides?

Boost list run by bdawes at, gregod at, cpdaniel at, john at