View source: R/rocker-S3-functions.R
getQuery | R Documentation |
Retrieve SQL query from database. Combination of functions sendQuery(), fetch() and clearResult(). If required, database is automatically connected and disconnected.
getQuery(db, statement, n = -1, ...)
db |
rocker object |
statement |
SQL query ( |
n |
Number of record to be fetched at once. All records will be fetched. |
... |
Optional, additional suitable parameters passed to |
Records
Other rocker-S3-functions:
appendTable()
,
begin()
,
canConnect()
,
clearResult()
,
columnInfo()
,
commit()
,
connect()
,
createTable()
,
disconnect()
,
execute()
,
existsTable()
,
fetch()
,
getInfoCon()
,
getInfoDrv()
,
getInfoRes()
,
getRowCount()
,
getRowsAffected()
,
getStatement()
,
hasCompleted()
,
isValidCon()
,
isValidDrv()
,
isValidRes()
,
listFields()
,
listObjects()
,
listTables()
,
readTable()
,
removeTable()
,
rocker-README
,
rocker-S3-functions
,
rocker-package
,
rollback()
,
sendQuery()
,
sendStatement()
,
setupDriver()
,
setupMariaDB()
,
setupPostgreSQL()
,
setupSQLite()
,
unloadDriver()
,
validateCon()
,
writeTable()
db <- rocker::newDB() rocker::setupSQLite(db) rocker::connect(db) rocker::writeTable(db, "mtcars", mtcars) output <- rocker::getQuery(db, "SELECT * FROM mtcars;") rocker::disconnect(db) rocker::unloadDriver(db)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.