| commit {RSQLite} | R Documentation |
Commit/rollback SQL transactions
commit(con, ...) rollback(con, ...)
con |
a dbConnection object, as
produced by the function
dbConnect.
|
... |
any database-specific arguments. |
Not all database engines implement transaction management, MySQL, for instance.
NULL
The current transaction on the connections con
is committed or rolled back.
See The Omega Project for Statistical Computing (http://www.omegahat.org) for more details on the R/S database interface.
On database managers:
On connections, SQL statements and resultSets:
dbExecStatement
dbExec
fetch
quickSQL
On transaction management:
On meta-data:
describe
getVersion
getDatabases
getTables
getFields
getCurrentDatabase
getTableIndices
getException
getStatement
hasCompleted
getRowCount
getAffectedRows
getNullOk
getInfo
ora <- Oracle()
con <- dbConnect(ora)
rs <- dbExecStatement(con,
"delete * from PURGE as p where p.wavelength<0.03")
if(rowsAffected(rs) > 250){
warning("dubious deletion -- rolling back transaction")
rollback(con)
}