File: setSqlTypeInfo.Rd

package info (click to toggle)
rodbc 1.1.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 380 kB
  • ctags: 101
  • sloc: ansic: 1,126; makefile: 64; sh: 29
file content (47 lines) | stat: -rw-r--r-- 1,279 bytes parent folder | download | duplicates (3)
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
\name{setSqlTypeInfo}
\alias{setSqlTypeInfo}
\alias{getSqlTypeInfo}
\title{Specify a Mapping of R Types to DBMS Types}
\description{
  Specify or retrieve a mapping of \R types to DBMS datatypes.
}
\usage{
setSqlTypeInfo(driver, value)

getSqlTypeInfo(driver)
}
\arguments{
  \item{driver}{A character string specifying the driver as returned by
    \code{\link{odbcGetInfo}}.  Optional for \code{getSqlTypeInfo}.}
  \item{value}{A named list with character values.  This should have
    names \code{"double"}, \code{"integer"}, \code{"character"} and
    \code{"logical"}.}
}
\details{
  This information is used by \code{\link{sqlSave}} if it creates a
  table in the DBMS.

  The types chosen should be nullable to allow \code{NA}s to be
  represented.  (Bit and boolean types generally are not.)
}
\value{
  For \code{setSqlTypeInfo} none.

  For \code{getSqlTypeInfo} with an argument, a named list.  Without an
  argument, a data frame.
}
\author{
  Brian Ripley
}
\seealso{
  \code{\link{sqlTypeInfo}}, \code{\link{sqlSave}}.
}
\examples{\dontrun{
getSqlTypeInfo()
getSqlTypeInfo("MySQL")
setSqlTypeInfo("SQLServer",
               list(double="float", integer="int",
                    character="varchar(255)", logical="varchar(5)"))
}}
\keyword{IO}
\keyword{database}