Boost logo

Boost :

Subject: Re: [boost] SQL client library ?
From: Jean-Louis Leroy (jl_at_[hidden])
Date: 2009-09-16 01:54:37


I am writing the library that implements the syntax I described. I will
show working code soon (or right now upon request).

I am sorely tempted to overload the comma operator for "select", "from"
and "in". I know the usual caveats (low precedence, default behavior
exists for UDTs).

The alternatives for open lists are : use the preprocessor to crank out
overloads like in the MPL ; build lists one at a time [i.e.
select(t1.id)(t2.name)(t3.age).from(t1)(t2)(t3).where(t1.id.in(1)(2))]...and
overload the comma operator on well-targeted types [e.g.
template<typename T> operator ,(expression<T>, expression<T>)]. And
perhaps make the comma operator available but in a namespace (gives
choice but usually alternative syntaxes are a bad idea).

Opinions ?

J-L


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk