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 56 57
|
% $Id: dbSendQuery-methods.Rd,v 0.1 2008/07/23 02:38:31 psk Exp $
\name{dbSendQuery-methods}
\docType{methods}
\alias{dbSendQuery-methods}
\alias{dbGetQuery-methods}
\alias{dbClearResult-methods}
\alias{dbGetException-methods}
\alias{dbSendQuery,PostgreSQLConnection,character-method}
\alias{dbGetQuery,PostgreSQLConnection,character-method}
\alias{dbClearResult,PostgreSQLResult-method}
\alias{dbGetException,PostgreSQLConnection-method}
\alias{dbGetException,PostgreSQLResult-method}
\title{
Execute a statement on a given database connection
}
\description{
These methods are straight-forward implementations of the corresponding
generic functions.
However, for complex data like array are just transferred as a string instead of the corresponding
vector in R. This behavior will change in future releases, and the author is advised not to rely on it.
}
\section{Methods}{\describe{
\item{conn}{
an \code{PostgreSQLConnection} object.
}
\item{statement}{a character vector of length 1 with the SQL statement.}
\item{res}{an \code{PostgreSQLResult} object.}
\item{\dots }{additional parameters.}
}
}
\references{
See the Database Interface definition document
\code{DBI.pdf} in the base directory of this package
or \url{https://cran.r-project.org/package=DBI}.
}
\seealso{
\code{\link{PostgreSQL}},
\code{\link[DBI]{dbDriver}},
\code{\link[DBI]{dbConnect}},
\code{\link[DBI]{fetch}},
\code{\link[DBI]{dbCommit}},
\code{\link[DBI]{dbGetInfo}},
\code{\link[DBI]{dbReadTable}}.
}
\examples{\dontrun{
drv <- dbDriver("PostgreSQL")
con <- dbConnect(drv, "usr", "password", "dbname")
res <- dbSendQuery(con, "SELECT * from sales")
data <- fetch(res, n = -1)
# alternatively, use dbGetQuery
data <- dbGetQuery(con, "SELECT * from sales")
}
}
\keyword{methods}
\keyword{interface}
\keyword{database}
% vim: syntax=tex
|