Description Usage Arguments Value
The function dbWithTransaction_or_Savepoint() starts a new transaction
or issues a savepoint via dbBegin_or_Savepoint(). If the execution of
the code argument fails, the state will be committed or the savepoint
removed via dbCommit_or_Savepoint(). Otherwise, the transaction is
rollbacked completely or up until the savepoint via
dbRollback_or_Savepoint(). The functions work similiarly to
dbWithTransaction(), dbBegin(),
dbCommit() or dbRollback(),
respectively, but allow to be nested by using savepoints if necessary.
1 2 3 4 5 6 7 | dbBegin_or_Savepoint(conn, spname)
dbCommit_or_Savepoint(conn, transaction, spname)
dbRollback_or_Savepoint(conn, transaction, spname)
dbWithTransaction_or_Savepoint(conn, code, spname)
|
conn |
Database connection. |
spname |
String of the possibly required savpoint. |
transaction |
Use standard transactions or use Savepoints? |
code |
An arbitrary block of R code. |
dbWithTransaction_or_Savepoint() returns the value of the
executed code.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.