Learn R Programming

DBI (version 0.1-10)

dbDataType-methods: Determine the SQL Data Type of an S object

Description

Determine an (approximately) appropriate SQL data type for an R/S-Plus object.

Usage

dbDataType(dbObj, obj, ...)

Arguments

dbObj
a DBIDriver object, e.g., ODBCDriver, OracleDriver.
obj
R/S-Plus object whose SQL type we want to determine.
...
any other parameters that individual methods may need.

Value

  • A character string specifying the SQL data type for obj.

Details

This is a generic function. The default method determines the SQL type of an R/S-Plus object according to the SQL 92 specification, which may serve as a starting point for driver implementations.

References

See the Database Interface definition document DBI.pdf in the base directory of this package or http://developer.r-project.org/db.

See Also

isSQLKeyword make.db.names

Examples

Run this code
data(quakes)
ora <- dbDriver("MySQL")
sql.type <- dbDataType(ora, quakes)

Run the code above in your browser using DataLab