dm_db_begin Interface

public interface dm_db_begin

Starts a transaction. Public alias for db_begin().

Optional argument mode may be one of:

  • DB_TRANS_DEFERRED
  • DB_TRANS_IMMEDIATE
  • DB_TRANS_EXCLUSIVE

The default mode is DB_TRANS_DEFERRED.


Module Procedures

private function db_begin(db, mode) result(rc)

Starts a transactions in IMMEDIATE mode. Mode shall be either DB_TRANS_DEFERRED, DB_TRANS_IMMEDIATE, or DB_TRANS_EXLCUSIVE. Default is DB_TRANS_IMMEDIATE.

The function returns the following error codes:

  • E_DB_TRANSACTION if the transaction failed.
  • E_INVALID if the transaction mode is invalid.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

integer, intent(in), optional :: mode

Transaction mode.

Return Value integer