# Transaction_Control

> All access to data stored in a database is done within a transaction. These functions are used to manage database transactions.

> ## General

> mco_trans_start
> Start a database transaction
> mco_trans_start_ex
> Start a database transaction with an isolation level
> mco_trans_upgrade
> Upgrade to a `READ_WRITE` transaction
> mco_trans_checkpoint
> Insert updated objects into indexes prior to committing or rolling back the transaction
> mco_trans_commit
> Commit a transaction
> mco_trans_commit_phase1
> Commit phase 1 of a two-phase transaction
> mco_trans_commit_phase2
> Commit phase 2 of a two-phase transaction
> mco_trans_iterate
> Iterate over all modifications made by a transaction
> mco_trans_no
> Retrieve the “counter” number which uniquely identifies a transaction
> mco_disk_confirm_transaction
> Recover and commit a database transaction left in an “incomplete” state
> mco_disk_reject_transaction
> Reject (roll back) a database transaction left in an “incomplete” state
> mco_trans_rollback
> Abort a transaction
> mco_trans_type
> Return the type of a transaction referenced by the handle
> mco_set_trans_callback
> Assign a callback function to be called when a transaction is committed or rolled back
> mco_trans_is_active
> Check whether a database transaction is currently active
> mco_trans_iterable
> Enable or disable transaction iteration support for a database connection
> mco_trans_set_options
> Set transaction-specific options that apply only for the duration of the current transaction

> ## MVCC Transaction Manager

> mco_trans_get_supported_isolation_levels
> Get the isolation levels supported by the current Transaction Manager
> mco_trans_isolation_level
> Get the isolation level of the current connection
> mco_trans_set_default_isolation_level
> Set the default isolation level for the current connection
> mco_trans_set_unused_versions_limit
> Set the maximum number of “unused versions” retained by the MVCC Transaction Manager
> mco_trans_set_cleanup_period
> Control how often the MVCC Transaction Manager removes unused versions
> mco_trans_optimistic_threshold
> Control the MVCC Transaction Manager behavior with respect to the number of conflicts
> mco_trans_set_gc_policy
> Set the garbage collection policy for the current connection