File: test_data_type.Rd

package info (click to toggle)
r-cran-dbitest 1.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,216 kB
  • sloc: sh: 10; makefile: 2
file content (55 lines) | stat: -rw-r--r-- 1,636 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spec-driver-data-type.R
\name{test_data_type}
\alias{test_data_type}
\title{test_data_type}
\usage{
test_data_type(ctx, dbObj)
}
\arguments{
\item{ctx, dbObj}{Arguments to internal test function}
}
\value{
\code{dbDataType()} returns the SQL type that corresponds to the \code{obj} argument
as a non-empty
character string.
For data frames, a character vector with one element per column
is returned.
}
\description{
test_data_type
}
\section{Failure modes}{

An error is raised for invalid values for the \code{obj} argument such as a
\code{NULL} value.
}

\section{Specification}{

The backend can override the \code{\link[DBI:dbDataType]{DBI::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 \code{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
\link{logical},
\link{integer},
\link{numeric},
\link{character},
dates (see \link{Dates}),
date-time (see \link{DateTimeClasses}),
and \link{difftime}.
If the database supports blobs,
this method also must accept lists of \link{raw} vectors,
and \link[blob:blob]{blob::blob} objects.
As-is objects (i.e., wrapped by \code{\link[=I]{I()}}) must be
supported and return the same results as their unwrapped counterparts.
The SQL data type for \link{factor} and
\link{ordered} is the same as for character.
The behavior for other object types is not specified.
}

\keyword{internal}