Hello, Phil Yard wrote:
> I did consider using rowset & iterator, but I would have a performance > issue as I would end up fetching a single row at a time from the > database Yes. > I'm not clear why soci::row could not be used as a type in the same way > as the other supported fundamental types. For example, vector<int> creates a contiguous array, which is a single block in memory. If vector has 1000 entries, then this block has 4000 bytes. The backend can then stream the data *directly* into this block, without any translation or other processing. Currently only the Oracle backend uses this feature (and the fact is that only the Oracle client API supports this kind of transfers), but the benefits are really spectacular. Similarly for vectors of other fundamental types and strings (wich are then fixed-size char arrays for the purpose of this transfer). It is not possible to make vector<row> with similar effect, because row is a complicated object and the backend has no knowledge of its internals. Please remember that with such block-based transfers the buffers have to be prepared before the query is executed. For this reason only statically-bound data is supported. Regards, -- Maciej Sobczak * www.msobczak.com * www.inspirel.com ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
