|
Boost : |
From: Jose (jmalv04_at_[hidden])
Date: 2005-10-04 05:10:50
One idea that could make the syntax issues more palatable is to incorporate
some ideas from the soci.sf.net <http://soci.sf.net> library
http://lists.boost.org/Archives/boost/2005/10/94680.php
I have not given thought to how easy it would be to implement it, but the
idea is that the queries are valid sql queries and then the soci layer
translates those to the more arcane syntax/es. Simplifying and unifying the
syntax should be a good thing !
On 10/3/05, Calum Grant <calum_at_[hidden]> wrote:
>
>
> > Macros are useful tools - you only have to look at
> > Boost.PreProcessor to
> > see how powerful it can be! However, macros/preprocessor sould be,
> > wherever possible, restricted to implementation (like Boost.Function).
>
> I think the solution is to provide both syntaxes. Macro-haters can
> write
>
> typedef relational::row< unique<int>, indexed<std::string> >
> Person;
> enum { person_id, person_name };
> table<Person> people;
>
> select(people, col<person_name>() == "Reece");
>
> while people who don't mind macros can write
>
> RM_DEFINE_ROW(Person,
> unique<int>, id,
> indexed<std::string>, name);
> table<Person> people;
>
> select(people, people.name <http://people.name> == "Reece");
>
> It seems pretty clear that there are varying tastes, so the only
> solution is to provide both. The notation provided first was the
> original approach that RML used, and was free from macros, so it would
> not be too much trouble to put that code back in. I will do that in the
> next release of RML (which will probably be a couple of weeks as I
> collate feedback).
>
> Thanks all for the feedback, keep it coming,
>
> Calum
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk