- Installation
- install.packages("RPostgreSQL")
- library(RPostgreSQL)
- Driver
- drv <- dbDriver("PostgreSQL")
- dbListConnections(drv)
- dbGetInfo(drv)
- summary(drv)
- dbUnloadDriver(drv)
- Connection
- con <- dbConnect (drv, user ="tester", password ="tester", dbname ="testDB", host ="IP Address")
- dbGetException(con)
- dbListResults(con)
- dbListTables(con)
- dbBeginTransaction(con)
- dbRollback(con)
- dbCommit(con)
- dbDisconnect(con)
- dbExistsTable(con, "table name")
- dbRemoveTable(con,"table name")
- dbListFields(con, "table name")
- df <- dbReadTable(con, "table name")
- dbWriteTable(con, "new table name", df)
- dbGetQuery(con, "select * from tableName")
- Result Set
- rs <- dbSendQuery(con, "select * from tableName")
- dbGetStatement(rs)
- dbColumnInfo(rs)
- dbGetRowsAffected(rs)
- dbHasCompleted(rs)
- dbGetRowCount(rs)
- dbClearResult(rs)
- fetch(rs, n = 1)
- fetch(rs, n = -1)
Friday, January 2, 2015
RPostgreSQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.