dbSetTypeMaps | R Documentation |
Type mapping functions are functions that perform conversions between
types as they are received from JDBC to R objects. For any JDBC type
it is possible to define a function which is called before returning
results from fetch()
.
dbSetTypeMaps()
function sets, removes or lists the mapping
functions.
dbSetTypeMaps(...)
... |
one or more arguments of the form |
The type names correspond to the column type names as defined by JDBC
(see java.sql.Types
Java documentation). For example, if you
want to convert NUMERIC
columns to numeric values in R
(regardless of precision)
Named list of currently registered type mapping functions. If
...
is empty then visibly, otherwise invisibly.
str(dbSetTypeMaps())
## use bit64::as.integer64 (if available) to convert BIGINT to integer64
if (is.environment(bit64 <- tryCatch(getNamespace("bit64"), error=function(e) FALSE)))
dbSetTypeMaps(BIGINT=bit64$as.integer64)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.