mdb_stream_table() opens a named table without reading its rows. Fetch
batches with DBI::dbFetch() and close with DBI::dbClearResult().
The cursor is also closed by garbage collection, but explicit clearing is
recommended. Opening does not scan rows. dbFetch(n) reads at most n
rows; n = 0 does not advance, and n = -1 reads all remaining rows into
memory. After exhaustion a typed zero-row frame is returned. The result
remains valid until cleared; after clearing it is invalid. Memory during
finite fetches is bounded by the batch and the size of an individual field
(including text conversion buffers). Binary and OLE columns are lists of
raw vectors; SQL NULL is represented by NULL in those lists. Other NULLs
are typed NA. Unsupported column types fail explicitly.
mdb_stream_table(conn, table)A DBI result; fetch with DBI::dbFetch(result, n = 1000L).
if (FALSE) { # \dontrun{
con <- DBI::dbConnect(mdb(), dbname = mdb_example())
res <- mdb_stream_table(con, "Shippers")
DBI::dbFetch(res, n = 100L)
DBI::dbClearResult(res)
DBI::dbDisconnect(con)
} # }