dbGetStatement {DBI}R Documentation

Get the statement associated with a result set

Description

Returns the statement that was passed to dbSendQuery.

Usage

dbGetStatement(res, ...)

Arguments

res

An object inheriting from DBIResult.

...

Other arguments passed on to methods.

Value

a character vector

See Also

Other DBIResult generics: DBIResult-class, SQL, dbBind, dbClearResult, dbColumnInfo, dbFetch, dbGetInfo, dbGetRowCount, dbGetRowsAffected, dbHasCompleted, dbIsValid

Examples

con <- dbConnect(RSQLite::SQLite(), ":memory:")

dbWriteTable(con, "mtcars", mtcars)
rs <- dbSendQuery(con, "SELECT * FROM mtcars")
dbGetStatement(rs)

dbClearResult(rs)
dbDisconnect(con)

[Package DBI version 0.5-1 Index]