Last chance! 50% off unlimited learning
Sale ends in
execute
method, which is an
ROracle specific DBI extension.
"dbSendQuery"(conn, statement, data = NULL, prefetch = FALSE, bulk_read = 1000L, bulk_write = 1000L, ...)
"dbGetQuery"(conn, statement, data = NULL, prefetch = FALSE, bulk_read = 1000L, bulk_write = 1000L, ...)
"oracleProc"(conn, statement, data = NULL, prefetch = FALSE, bulk_read = 1000L, bulk_write = 1000L, ...)
"dbClearResult"(res, ...)
"dbGetException"(conn, ...)
execute(res, ...)
"execute"(res, data = NULL, ...)
OraConnection
object.OraResult
object.data.frame
specifying bind dataTRUE
, then ROracle
uses OCI prefetch buffers to retrieve additional data from the server thus
saving the memory required in RODBI/ROOCI by allocating a single row buffer
to fetch the data from OCI. Using prefetch results in a fetch call for every
row. If FALSE
(the default), then ROracle uses an array fetch to
retrieve the data.
bulk_write
to a large
value results in more memory being allocated based on the number of columns
in the insert list and the types of columns.
OraResult
object whose class extends DBIResult
. This
object is used to fetch data from a database, using the function
fetch
.
fetch
.
Oracle
,
dbDriver
,
dbConnect
,
fetch
,
dbCommit
,
dbGetInfo
,
dbReadTable
.
## Not run:
# drv <- dbDriver("Oracle")
# con <- dbConnect(drv, "scott", "tiger")
# res <- dbSendQuery(con, "select * from emp where deptno = :1",
# data = data.frame(deptno = 10))
# data <- fetch(res, n = -1)
# res2 <- dbSendQuery(con, "select * from emp where deptno = :1",
# data1 <- data.frame(deptno = 10), prefetch=TRUE,
# bulk_read=2L)
# data1 <- fetch(res2, n = -1)
# data1
#
# res3 <- dbSendQuery(con, "select * from emp where deptno = :1",
# data2 <- data.frame(deptno = 10), bulk_read=10L)
# data2 <- fetch(res3, n = -1)
# data2
#
# res4 <- dbSendQuery(con, "select * from emp where deptno = :1",
# data3 <- data.frame(deptno = 10), bulk_write=10L)
# data3 <- fetch(res4, n = -1)
# data3
#
# res5 <- dbSendQuery(con, "select * from emp where ename = :1",
# data4 <- data.frame(ename = 'SMITH'))
# data4 <- fetch(res5, n = -1)
# data4
# ## End(Not run)
Run the code above in your browser using DataLab