DuroDBMS API
1.7
|
Functions | |
int | RDB_begin_tx (RDB_exec_context *ecp, RDB_transaction *txp, RDB_database *dbp, RDB_transaction *parentp) |
int | RDB_commit (RDB_exec_context *ecp, RDB_transaction *txp) |
int | RDB_rollback (RDB_exec_context *ecp, RDB_transaction *txp) |
int | RDB_rollback_all (RDB_exec_context *ecp, RDB_transaction *txp) |
RDB_bool | RDB_tx_is_running (RDB_transaction *txp) |
RDB_database * | RDB_tx_db (RDB_transaction *txp) |
int RDB_begin_tx | ( | RDB_exec_context * | ecp, |
RDB_transaction * | txp, | ||
RDB_database * | dbp, | ||
RDB_transaction * | parentp | ||
) |
Start a transaction which interacts with the database *dbp.
If parentp is not NULL, the new transaction is a subtransaction of the transaction specified by parentp.
The execution of a parent transaction is suspended while a child transaction executes. It is an error to perform an operation under the control of a transaction which has a running child transaction.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may also fail for a system error.
Referenced by RDB_drop_db().
int RDB_commit | ( | RDB_exec_context * | ecp, |
RDB_transaction * | txp | ||
) |
RDB_commit commits the transaction pointed to by txp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may also fail for a system error.
int RDB_rollback | ( | RDB_exec_context * | ecp, |
RDB_transaction * | txp | ||
) |
RDB_rollback terminates the transaction pointed to by txp and rolls back all changes made by this transaction and its subtransactions.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may also fail for a system error.
Referenced by RDB_rollback_all().
int RDB_rollback_all | ( | RDB_exec_context * | ecp, |
RDB_transaction * | txp | ||
) |
Aborts the transaction *txp and all parent transactions.
References RDB_rollback().
RDB_database* RDB_tx_db | ( | RDB_transaction * | txp | ) |
Return the database the transaction pointed to by txp interacts with.
A pointer to the RDB_database structure that represents the database.
References RDB_alloc().
Referenced by RDB_drop_constraint(), RDB_get_update_op(), and RDB_get_update_op_by_args().
RDB_bool RDB_tx_is_running | ( | RDB_transaction * | txp | ) |
RDB_tx_is_running returns if txp points to a running transaction.
RDB_TRUE if the transaction is running, RDB_FALSE otherwise.
Referenced by RDB_define_subtype(), RDB_drop_op(), RDB_drop_table(), RDB_drop_type(), RDB_implement_type(), RDB_map_public_table(), and RDB_table_contains().