Is their a flag to return the whole result set as it would kinda be expensive to add another select statement. The query is very extensive.
Joe
On Fri, Apr 6, 2012 at 8:11 AM, Jan-Henrik Haukeland hauk@tildeslash.comwrote:
ResultSet is designed as a dynamic result sets and the size of the set is not known a priori. That is, instead of retrieving the full result set once, only a few rows are retrieved when needed and when there are no more rows, ResultSet_next returns false. The idea of this design is to save memory and be able to retrieve GB sized result sets without using GB of memory.
That was the original idea, but it is only implemented for MySQL and possibly for Oracle, the other drivers retrieve the full set AFAIK. Though it is unknown if libpq (postgres) tries to do some similar caching internally. Anyway, the result of this is that number of rows in a result set is not known beforehand at the libzdb API level.
To get the number of rows in a set, you will have to use something like 'select count(*)' first.
On Apr 6, 2012, at 4:05 PM, Joe Flemmings wrote:
I need to get the number of rows in a query. I only see number of
columns with ResultSet_getColumnCount
Please advice.
Thanks Joe
-- To unsubscribe: http://www.tildeslash.com/mailman/listinfo/libzdb-general