spec_arrow_fetch_arrow
Value
dbFetchArrow() always returns an object coercible to a data.frame with as many rows as records were fetched
and as many columns as fields in the result set,
even if the result is a single value
or has one
or zero rows.
Specification
Fetching multi-row queries with one
or more columns by default returns the entire result.
The object returned by dbFetchArrow() can also be passed to nanoarrow::as_nanoarrow_array_stream()
to create a nanoarrow array stream object that can be used to read the result set in batches.
The chunk size is implementation-specific.
The schema of the result is available before any batch is consumed:
nanoarrow::infer_nanoarrow_schema() applied to the object returned by dbFetchArrow()
gives a struct schema with one child per column, named like the columns.
Inspecting the schema does not consume the stream.