rocker-S3-functions | R Documentation |
R6 class interface for handling database connections using DBI package as backend. The class allows handling of connections to e.g. PostgreSQL, MariaDB and SQLite. Although rocker is a R6 class, functions can be also accesses in classical S3 way.
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-package
,
rollback()
,
sendQuery()
,
sendStatement()
,
setupDriver()
,
setupMariaDB()
,
setupPostgreSQL()
,
setupSQLite()
,
unloadDriver()
,
validateCon()
,
writeTable()
Other rocker:
newDB()
,
rocker-R6-class
,
rocker-README
,
rocker-package
# New database handling object db <- rocker::newDB() # Setup SQLite database rocker::setupSQLite(db) # Open connection rocker::connect(db) # Write table rocker::writeTable(db, "mtcars", mtcars) # Get query output <- rocker::getQuery(db, "SELECT * FROM mtcars;") # Close connection rocker::disconnect(db) # Reset database handling object rocker::unloadDriver(db)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.