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.

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);


vec.resize(100); // some batch size
Statement st = (sql.prepare << "select val from numbers", into(vec));
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 <>

Maciej Sobczak :
Programming    :

Boost list run by bdawes at, gregod at, cpdaniel at, john at