mg_session_begin_transaction

Starts an Explicit transaction on the server.

Every run will be part of that transaction until its explicitly ended.

extern (C)
int
mg_session_begin_transaction

Parameters

extra_run_information mg_map*

A mg_map containing extra information that will be used for every statement that is ran as part of the transaction. It can contain the following information: - bookmarks - list of strings containing some kind of bookmark identification - tx_timeout - integer that specifies a transaction timeout in ms. - tx_metadata - dictionary taht can contain some metadata information, mainly used for logging. - mode - specifies what kind of server is the run targeting. For write access use "w" and for read access use "r". Defaults to write access. - db - specifies the database name for multi-database to select where the transaction takes place. If no db is sent or empty string it implies that it is the default database. Return: Returns 0 if the transaction was started successfully. Otherwise, a non-zero error code is returned.

Meta