Hi Maciej, thanks for the quick response.
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 (ultimately statement_backend::fetch(number) gets called with
the value '1' many times).
I'm not clear why soci::row could not be used as a type in the same way
as the other supported fundamental types. If it were, vector<row> would
be 'properly typed' - it would be up to the user to dynamically extract
the columns. Or am I missing something fundamental?
Regards,
Phil
-----Original Message-----
From: Maciej Sobczak [mailto:[email protected]]
Sent: 02 September 2009 15:01
To: General-purpose list for SOCI users.
Subject: Re: [SOCI-users] vector<row>
Hello,
Phil Yard wrote:
> Are there any plans to support vector<row>?
No.
vector<T> is supposed to provide the means of direct array mapping for
the backend, which can then just fill the sequence of data values
starting at the beginning of the buffer.
For this to work it is important to ensure proper typing of the array.
There is no way to make it work with dynamically discovered columns.
> I need the ability to query a large database with arbitrary columns.
> Ideally, I would use the idiomatic way of reading rows in batches (as
> described in the soci docs), but it seems that I would need to provide
a
> vector for each column and would therefore need to know the type of
each
> column at compile time.
You can also consider using rowset and its iterator:
http://soci.sourceforge.net/doc/statements.html#rowset
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
Disclaimer
-------------------------------------------------------------------------------------------
This email message has been scanned for viruses by Mimecast.
Mimecast delivers a complete managed email solution from a single web based
platform.
For more information please visit www.mimecast.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