Learn R Programming

RSQLite (version 1.0.0)

dbDataType,SQLiteConnection-method: Determine the SQL Data Type of an R object.

Description

This method is a straight-forward implementation of the corresponding generic function.

Usage

# S4 method for SQLiteConnection
dbDataType(dbObj, obj, ...)

# S4 method for SQLiteDriver dbDataType(dbObj, obj, ...)

Arguments

dbObj

a SQLiteDriver object,

obj

an R object whose SQL type we want to determine.

...

Needed for compatibility with generic. Otherwise ignored.

Examples

Run this code
# NOT RUN {
data(quakes)
drv <- SQLite()

sapply(quakes, function(x) dbDataType(drv, x))

dbDataType(drv, 1)
dbDataType(drv, as.integer(1))
dbDataType(drv, "1")
dbDataType(drv, charToRaw("1"))
# }

Run the code above in your browser using DataLab