dbCommit-methods {RMySQL} | R Documentation

## DBMS Transaction Management

### Description

Commits or roll backs the current transaction in an MySQL connection

### Methods

conn
  a `MySQLConnection` object, as produced by the function `dbConnect`.
...
  currently unused.

### References

See the Database Interface definition document `DBI.pdf` in the base directory of this package or http://stat.bell-labs.com/RS-DBI.

### See Also

`MySQL`, `dbConnect`, `dbSendQuery`, `dbGetQuery`, `fetch`, `dbCommit`, `dbGetInfo`, `dbReadTable`.

### Examples

    ## Not run:
    drv <- dbDriver("MySQL")
    con <- dbConnect(drv, group = "group")
    rs <- dbSendQuery(con,
          "delete * from PURGE as p where p.wavelength<0.03")
    if(dbGetInfo(rs, what = "rowsAffected") > 250){
      warning("dubious deletion -- rolling back transaction")
      dbRollback(con)
    }
    ## End(Not run)

[Package RMySQL version 0.6-0 Index]