|
Boost : |
Subject: Re: [boost] SQL: next iteration of sqlpp11
From: Roland Bock (rbock_at_[hidden])
Date: 2014-02-04 07:53:46
On 2014-02-04 10:53, Alexander Lamaison wrote:
> Roland Bock <rbock_at_[hidden]> writes:
>
>> On 2014-02-03 17:21, Alexander Lamaison wrote:
>>> Roland Bock <rbock_at_[hidden]> writes:
>>>
>>>> Dear boosters,
>>>>
>>>> after the lively discussion about sqlpp11 in November 2013
>>>> (http://lists.boost.org/Archives/boost/2013/11/208388.php), sqlpp11 has
>>>> evolved quite a bit and I want to give you an update.
>>>>
>>>> https://github.com/rbock/sqlpp11
>>> snip
>>>
>>>> auto i = insert_into(tab).columns(tab.alpha, tab.beta);
>>>>
>>>> //Then you add values (one or more times):
>>>> i.values(tab.alpha = 7, tab.beta = "seven");
>>>>
>>>> // Then you run the insert
>>>> db.run(i);
>>> Just a thought: why not `operator()` instead of `run`, making the db a
>>> callable?
>>>
>>> Alex
>> In addition to .run() there is also .prepare() which prepares a
>> statement for later and possibly repeated execution possibly with
>> parameters. The arguments for .run() and .prepare() are the same.
> Those other methods do non-'run-like' stuff so need custom names, but
> we already have an accepted name in C++ for methods that might otherwise
> be called 'run', 'execute', 'do', 'call', 'perform', 'invoke', etc.
> That name is 'operator()'.
>
> Alex
>
Good point. I'll play with that.
Regards,
Roland
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk