View source: R/spec-driver-data-type.R
test_data_type | R Documentation |
test_data_type
test_data_type(ctx, dbObj)
ctx , dbObj |
Arguments to internal test function |
dbDataType()
returns the SQL type that corresponds to the obj
argument
as a non-empty
character string.
For data frames, a character vector with one element per column
is returned.
An error is raised for invalid values for the obj
argument such as a
NULL
value.
The backend can override the dbDataType()
generic
for its driver class.
This generic expects an arbitrary object as second argument.
To query the values returned by the default implementation,
run example(dbDataType, package = "DBI")
.
If the backend needs to override this generic,
it must accept all basic R data types as its second argument, namely
logical,
integer,
numeric,
character,
dates (see Dates),
date-time (see DateTimeClasses),
and difftime.
If the database supports blobs,
this method also must accept lists of raw vectors,
and blob::blob objects.
As-is objects (i.e., wrapped by I()
) must be
supported and return the same results as their unwrapped counterparts.
The SQL data type for factor and
ordered is the same as for character.
The behavior for other object types is not specified.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.