Learn R Programming

DBI (version 0.2-1)

dbDataType: Determine the SQL Data Type of an S object

Description

Determine an (approximately) appropriate SQL data type for an S object.

Usage

dbDataType(dbObj, obj, ...)

Arguments

dbObj
a DBIDriver object, e.g., ODBCDriver, OracleDriver.
obj
R/Splus 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/Splus 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
ora <- dbDriver("Oracle")
sql.type <- dbDataType(ora, x)

Run the code above in your browser using DataLab