Subject: Re: [boost] SQL client library ?
From: joel (joel.falcou_at_[hidden])
Date: 2009-09-06 05:14:16
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 :
rows = select(age,name).from(employee)
.where( age > 45 && name
~= "Dil%" );
// Some random access
if( !r.empty() )
cout << r[name] << " is "
<< r[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
-- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk