DBI (version 0.5-1)

dbClearResult: Clear a result set

Description

Frees all resources (local and remote) associated with a result set. In some cases (e.g., very large result sets) this can be a critical step to avoid exhausting resources (memory, file descriptors, etc.)

Usage

dbClearResult(res, ...)

Arguments

res
An object inheriting from DBIResult.
...
Other arguments passed on to methods.

Value

a logical indicating whether clearing the result set was successful or not.

See Also

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

Examples

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

rs <- dbSendQuery(con, "SELECT 1")
print(dbFetch(rs))

dbClearResult(rs)
dbDisconnect(con)

Run the code above in your browser using DataCamp Workspace