upscaledb
2.2.1
|
Macros | |
#define | UPS_TXN_READ_ONLY 1 |
#define | UPS_TXN_TEMPORARY 2 |
Typedefs | |
typedef struct ups_txn_t | ups_txn_t |
Functions | |
UPS_EXPORT ups_status_t | ups_txn_begin (ups_txn_t **txn, ups_env_t *env, const char *name, void *reserved, uint32_t flags) |
UPS_EXPORT const char * | ups_txn_get_name (ups_txn_t *txn) |
UPS_EXPORT ups_status_t | ups_txn_commit (ups_txn_t *txn, uint32_t flags) |
UPS_EXPORT ups_status_t | ups_txn_abort (ups_txn_t *txn, uint32_t flags) |
#define UPS_TXN_READ_ONLY 1 |
Flag for ups_txn_begin
Definition at line 1202 of file upscaledb.h.
#define UPS_TXN_TEMPORARY 2 |
Definition at line 1205 of file upscaledb.h.
Definition at line 1167 of file upscaledb.h.
UPS_EXPORT ups_status_t ups_txn_abort | ( | ups_txn_t * | txn, |
uint32_t | flags | ||
) |
Aborts a Txn
This function aborts (= cancels) the sequence of Database operations.
Note that the function will fail with UPS_CURSOR_STILL_OPEN if a Cursor was attached to this Txn (with ups_cursor_create or ups_cursor_clone), and the Cursor was not closed.
txn | Pointer to a Txn structure |
flags | Optional flags for aborting the Txn, combined with bitwise OR. Unused, set to 0. |
Referenced by upscaledb::txn::abort().
UPS_EXPORT ups_status_t ups_txn_begin | ( | ups_txn_t ** | txn, |
ups_env_t * | env, | ||
const char * | name, | ||
void * | reserved, | ||
uint32_t | flags | ||
) |
Begins a new Txn
A Txn is an atomic sequence of Database operations. With ups_txn_begin such a new sequence is started. To write all operations of this sequence to the Database use ups_txn_commit. To abort and cancel this sequence use ups_txn_abort.
In order to use Transactions, the Environment has to be created or opened with the flag UPS_ENABLE_TRANSACTIONS.
You can create as many Transactions as you want (older versions of upscaledb did not allow to create more than one Txn in parallel).
txn | Pointer to a pointer of a Txn structure |
env | A valid Environment handle |
name | An optional Txn name |
reserved | A reserved pointer; always set to NULL |
flags | Optional flags for beginning the Txn, combined with bitwise OR. Possible flags are:
|
Referenced by upscaledb::env::begin().
UPS_EXPORT ups_status_t ups_txn_commit | ( | ups_txn_t * | txn, |
uint32_t | flags | ||
) |
Commits a Txn
This function applies the sequence of Database operations.
Note that the function will fail with UPS_CURSOR_STILL_OPEN if a Cursor was attached to this Txn (with ups_cursor_create or ups_cursor_clone), and the Cursor was not closed.
txn | Pointer to a Txn structure |
flags | Optional flags for committing the Txn, combined with bitwise OR. Unused, set to 0. |
Referenced by upscaledb::txn::commit().
UPS_EXPORT const char* ups_txn_get_name | ( | ups_txn_t * | txn | ) |
Retrieves the Txn name
Referenced by upscaledb::txn::get_name().