Boost logo

Boost :

From: Maciej Sobczak (prog_at_[hidden])
Date: 2005-10-03 04:37:53


Considering the fact that there was some interest in the database
library, I think it is a good time to revive the discussion:

-------
We are pleased to announce that the new version of SOCI library is
available for download.

http://soci.sourceforge.net/

The important new feature in the library allows to operate on whole
arrays of values (interfaced via std::vector), which can greatly
increase application performance by reducing network round-trips in
those queries that insert or retrieve many rows at once.
--------

I think that this feature is mandatory if we discuss a "quality"
library. The question is how to interface to it and how much generic
interface can be provided wrt so-called bulk operations.
At the moment, SOCI supports interfacing via std::vector, for example:

std::vector<int> vec;
// ...

sql << "insert into numbers(val) values(:val)", use(vec);

or:

vec.resize(100); // some batch size
Statement st = (sql.prepare << "select val from numbers", into(vec));
st.execute();
while (st.fetch())
{
     // here, vec has subsequent portions of the whole result
}

Your comments are welcome.

I would like to acknowledge that Steve Hutton entirely contributed to
the implementation of the bulk operations in this new release.

You can visit Steve at <http://featurecomplete.com/>

-- 
Maciej Sobczak : http://www.msobczak.com/
Programming    : http://www.msobczak.com/prog/

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