R: Information about result types

dbColumnInfo {DBI} | R Documentation

## Information about result types

### Description

Produces a data.frame that describes the output of a query. The data.frame should have as many rows as there are output fields in the result set, and each column in the data.frame should describe an aspect of the result set field (field name, type, etc.)

### Usage

    dbColumnInfo(res, ...)

### Arguments

`res` | An object inheriting from DBIResult.
`...` | Other arguments passed on to methods.

### Value

A data.frame with one row per output field in `res`. Methods MUST include `name`, `field.type` (the SQL type), and `data.type` (the R data type) columns, and MAY contain other database specific information like scale and precision or whether the field can store `NULL`s.

### See Also

Other DBIResult generics: `DBIResult-class`, `dbBind`, `dbClearResult`, `dbFetch`, `dbGetInfo`, `dbGetRowCount`, `dbGetRowsAffected`, `dbGetStatement`, `dbHasCompleted`, `dbIsValid`, `dbQuoteIdentifier`, `dbQuoteString`

### Examples

    con <- dbConnect(RSQLite::SQLite(), ":memory:")

    rs <- dbSendQuery(con, "SELECT 1 AS a, 2 AS b")
    dbColumnInfo(rs)
    dbFetch(rs)

    dbClearResult(rs)
    dbDisconnect(con)

[Package DBI version 0.6-1 Index]