bufferResultSet {ChemmineR} | R Documentation

## Buffer Query Results

### Description

Allow query results to be processed in batches for efficiency.

### Usage

    bufferResultSet(rs, rsProcessor, batchSize = 1000,closeRS=FALSE)

### Arguments

`rs` | A DBIResult object, usually from `dbSendQuery`.
`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?

### Value

No value.

### Author(s)

Kevin Horan

### Examples

    ##-- ==>  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)
        }
      }

[Package ChemmineR version 3.46.0 Index]