bufferResultSet {ChemmineR} | R Documentation |
Allow query results to be processed in batches for efficiency.
bufferResultSet(rs, rsProcessor, batchSize = 1000,closeRS=FALSE)
rs |
A DBIResult object, usually from |
rsProcessor |
Each batch will be passed as a data frame to this function for processing. |
batchSize |
The number of rows to read in each batch |
closeRS |
Should the result set be closed by this function when it is done? |
No value.
Kevin Horan
##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as function (rs, rsProcessor, batchSize = 1000) { while (TRUE) { chunk = fetch(rs, n = batchSize) if (dim(chunk)[1] == 0) break rsProcessor(chunk) } }