dbGetStatement | R Documentation |
Returns the statement that was passed to dbSendQuery()
or dbSendStatement()
.
dbGetStatement(res, ...)
res |
An object inheriting from DBIResult. |
... |
Other arguments passed on to methods. |
dbGetStatement()
returns a string, the query used in
either dbSendQuery()
or
dbSendStatement()
.
Attempting to query the statement for a result set cleared with
dbClearResult()
gives an error.
Other DBIResult generics:
DBIResult-class
,
dbBind()
,
dbClearResult()
,
dbColumnInfo()
,
dbFetch()
,
dbGetInfo()
,
dbGetRowCount()
,
dbGetRowsAffected()
,
dbHasCompleted()
,
dbIsReadOnly()
,
dbIsValid()
,
dbQuoteLiteral()
,
dbQuoteString()
con <- dbConnect(RSQLite::SQLite(), ":memory:")
dbWriteTable(con, "mtcars", mtcars)
rs <- dbSendQuery(con, "SELECT * FROM mtcars")
dbGetStatement(rs)
dbClearResult(rs)
dbDisconnect(con)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.