Boost logo

Boost :

Subject: Re: [boost] sqlpp11: SQL for C++
From: Christof Donat (cd_at_[hidden])
Date: 2013-11-11 16:08:39


Hi,

Am Montag, 11. November 2013, 22:02:50 schrieb Klaim - Joël Lamotte:
> On Mon, Nov 11, 2013 at 9:59 PM, Christof Donat <cd_at_[hidden]> wrote:
> > No. It uses the preprocessor to generate something like
> >
> > metaparse::string<'s','e','l','e','c','t',' ','n',',...>
> >
> > The downside is, that metaparse has a configurable maximum string length
> > and
> > increasing it also increases compile times. I am not sure, weather it
> > would be
> > possible to have reasonable compile times with SQL strings as they exist
> > in
> > real world applications.
>
> doesn't it still makes impossible to have variables in the request?

Yes and no. That could be solved with positional parameters like
boost::format:

db.run(QUERY("select name,salary from persons where id=%1" % 17));

Christof

-- 
okunah gmbh i.L.                             Software nach Maß
Zugspitzstr. 211                                 www.okunah.de
86165 Augsburg                                    cd_at_[hidden]
                                      Registergericht Augsburg
Geschäftsführer                             Augsburg HRB 21896
Christof Donat                           UStID: DE 248 815 055

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