|
Boost : |
Subject: Re: [boost] SQL: next iteration of sqlpp11
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2014-02-03 11:54:28
On Mon, Feb 3, 2014 at 5:32 PM, Roland Bock <rbock_at_[hidden]> wrote:
> On 2014-02-03 17:21, Alexander Lamaison wrote:
> > Roland Bock <rbock_at_[hidden]> writes:
> >> // Then you run the insert
> >> db.run(i);
> > Just a thought: why not `operator()` instead of `run`, making the db a
> > callable?
>
> 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.
>
> Tim Keitt suggested .execute() instead of run(), which would certainly
> be an option, but is much longer than .run() :-)
>
Execute or exec for short is more idiomatic in the DB world, I concur.
When iterating the result set, SQLite uses step() while OCI uses fetch().
Just FYI I guess. These are details of course. --DD
SQLite: https://www.sqlite.org/c3ref/exec.html
Oracle:
http://docs.oracle.com/cd/B28359_01/appdev.111/b28395/oci17msc001.htm#i574897
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk