sendStatement {rocker}R Documentation

Send SQL statement to database.

Description

Send SQL statement to database.

Usage

sendStatement(db, statement, ...)

Arguments

db

rocker object

statement

SQL statement (UPDATE, DELETE, INSERT INTO, ...)

...

Optional, additional suitable parameters passed to DBI::dbSendStatement()

Value

Invisible self

See Also

Other rocker-S3-functions: appendTable(), begin(), canConnect(), clearResult(), columnInfo(), commit(), connect(), createTable(), disconnect(), execute(), existsTable(), fetch(), getInfoCon(), getInfoDrv(), getInfoRes(), getQuery(), getRowCount(), getRowsAffected(), getStatement(), hasCompleted(), isValidCon(), isValidDrv(), isValidRes(), listFields(), listObjects(), listTables(), readTable(), removeTable(), rocker-README, rocker-S3-functions, rocker-package, rollback(), sendQuery(), setupDriver(), setupMariaDB(), setupPostgreSQL(), setupSQLite(), unloadDriver(), validateCon(), writeTable()

Examples

db <- rocker::newDB()
rocker::setupSQLite(db)
rocker::connect(db)
rocker::writeTable(db, "mtcars", mtcars)
rocker::sendStatement(db, "DELETE FROM mtcars WHERE gear = 3;")
rocker::clearResult(db)
rocker::disconnect(db)
rocker::unloadDriver(db)

[Package rocker version 0.3.1 Index]