$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] sqlpp11: SQL for C++
From: Roland Bock (rbock_at_[hidden])
Date: 2013-11-12 08:17:37
On 2013-11-12 09:39, Dominique Devienne wrote:
> On Mon, Nov 11, 2013 at 9:31 PM, Roland Bock <rbock_at_[hidden]> wrote:
>
>>> On 11/11/13 13:35, Abel Sinkovics wrote:
>>>> There is a library (Metaparse) which supports creating a string-based
>>>> interface for libraries which is processed at compile-time. It could be
>>>> used to provide a string-based interface.
>> Metaparse requires const char[N] arguments, right? That would be a
>> rather atypical case for using a query interface, I'd say. Personally I
>> have never used queries without variable parameters except in examples
>> like the one above.
>
> Do you mean that you "inline" the variable parameters values in the query
> text as opposed to using "placeholders" which you later "bind" with actual
> values?
I meant that real life queries are not as simple as the case discussed
above.
> If that's the case, that's a big no-no on some RDBMS's like Oracle for
> performance reason (you need to reparse and replan, i.e, "recompile" the
> query and find again the optimal query execution plan), w/o even getting
> into SQL injections, etc... A SQL DB API w/o support for prepared queries
> which you can reuse with different bind values would be ineffective IMHO.
> Similarly, if you cannot bind array of values to limit round-trips to the
> DB (if supported; SQLite has no array interface for example), you can never
> achieve maximum possible performance.
>
> My $0.02 :). --DD
>
Thanks for the input. Prepared queries are in fact not supported. I'll
read up on them and report back.
Regards,
Roland