## GdaTransactionStatus GdaTransactionStatus — Keeps track of the transactional status of a connection |

## Synopsis

                        GdaTransactionStatus;
    enum                GdaTransactionIsolation;
                        GdaTransactionStatusEvent;
    enum                GdaTransactionStatusEventType;
    enum                GdaTransactionStatusState;
    GdaTransactionStatus* gda_transaction_status_new        (const gchar *name);

## Object Hierarchy

      GObject
       +----GdaTransactionStatus

## Description

On any connection (as a GdaConnection object), if the database provider used by the connection supports it, transactions may be started, committed or rolledback, or savepoints added, removed or rolledback. These operations can be performed using Libgda's API (such as `gda_connection_begin_transaction()`), or directly using some SQL on the connection (usually a "BEGIN;" command). The GdaTransactionStatus's aim is to make it easy to keep track of all the commands which have been issued on a connection regarding transactions.

One GdaTransactionStatus object is automatically attached to a GdaConnection when a transaction is started, and is destroyed when the transaction is finished. A pointer to this object can be fetched using `gda_connection_get_transaction_status()` (beware that it should then not be modified).

## Details

### GdaTransactionStatus

    typedef struct _GdaTransactionStatus GdaTransactionStatus;

### enum GdaTransactionIsolation

    typedef enum {
    	GDA_TRANSACTION_ISOLATION_UNKNOWN,
    	GDA_TRANSACTION_ISOLATION_READ_COMMITTED,
    	GDA_TRANSACTION_ISOLATION_READ_UNCOMMITTED,
    	GDA_TRANSACTION_ISOLATION_REPEATABLE_READ,
    	GDA_TRANSACTION_ISOLATION_SERIALIZABLE
    } GdaTransactionIsolation;

### GdaTransactionStatusEvent

    typedef struct {
    	GdaTransactionStatus         *trans;
    	GdaTransactionStatusEventType type;
    	union {
    		gchar                *svp_name; /* save point name if this event corresponds to a new save point */
    		gchar                *sql;      /* SQL to store SQL queries in transactions */
    		GdaTransactionStatus *sub_trans;/* sub transaction event */
    	} pl;
    	GdaConnectionEvent           *conn_event;

    	gpointer  reserved1;
    	gpointer  reserved2;
    } GdaTransactionStatusEvent;

### enum GdaTransactionStatusEventType

    typedef enum {
    	GDA_TRANSACTION_STATUS_EVENT_SAVEPOINT,
    	GDA_TRANSACTION_STATUS_EVENT_SQL,
    	GDA_TRANSACTION_STATUS_EVENT_SUB_TRANSACTION
    } GdaTransactionStatusEventType;

### enum GdaTransactionStatusState

    typedef enum {
    	GDA_TRANSACTION_STATUS_STATE_OK,
    	GDA_TRANSACTION_STATUS_STATE_FAILED
    } GdaTransactionStatusState;

### gda_transaction_status_new ()

    GdaTransactionStatus* gda_transaction_status_new        (const gchar *name);

Creates a new GdaTransactionStatus object, which allows a fine-tune and full control of transactions to be used with providers.

`name` : | name for the transaction
Returns : | the newly created object.