dbDataType,SQLiteDriver-method {RSQLite}R Documentation

Determine the SQL Data Type of an R object

Description

Given an object, return its SQL data type as a SQL database identifier.

Usage

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

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

Arguments

dbObj

a SQLiteConnection or SQLiteDriver object

obj

an R object whose SQL type we want to determine.

...

Needed for compatibility with generic. Otherwise ignored.

See Also

The corresponding generic function DBI::dbDataType().

Examples

library(DBI)
dbDataType(RSQLite::SQLite(), 1)
dbDataType(RSQLite::SQLite(), 1L)
dbDataType(RSQLite::SQLite(), "1")
dbDataType(RSQLite::SQLite(), TRUE)
dbDataType(RSQLite::SQLite(), list(raw(1)))

sapply(datasets::quakes, dbDataType, dbObj = RSQLite::SQLite())

[Package RSQLite version 1.1-2 Index]