
On Sat, Apr 15, 2006 at 08:16:01PM -0300, Felipe Magno de Almeida <felipe.m.almeida@gmail.com> wrote:
On 4/15/06, Andreas Pokorny <andreas.pokorny@gmx.de> wrote:
[snipped]
Slightly offtopic, but what about something like:
using std::sql::select; using std::sql::from;
auto query = select >> value >> from >> numbers;
^ numbers.value of course
typedef decltype(query)::tuple_type tuple_type;
sql::rowset<tuple_type> rows(query,db); ...
or maybe a more generic reational syntax...
I was thinking exactly about something like this. A xpressive/spirit-like way of writing SQL. It should be faster too, I guess.
I am not sure if it faster, but errors could be detected earlier. If the dsl query language is defined generic enough, the query expression could be transformed into database specific query strings, or STL/Multindex query functors, boost::rtl queries or whatever (during compiletime). One would need two separate query models for relational and tree like data, to fullfill most needs. Andeas Pokorny