GdaTransaction

GdaTransaction — Management of transactions

Synopsis

                    GdaTransactionPrivate;
GdaTransaction*     gda_transaction_new                 (const gchar *name);
enum                GdaTransactionIsolation;
GdaTransactionIsolation gda_transaction_get_isolation_level
                                                        (GdaTransaction *xaction);
void                gda_transaction_set_isolation_level (GdaTransaction *xaction,
                                                         GdaTransactionIsolation level);
const gchar*        gda_transaction_get_name            (GdaTransaction *xaction);
void                gda_transaction_set_name            (GdaTransaction *xaction,
                                                         const gchar *name);

Description

Details

GdaTransactionPrivate

typedef struct _GdaTransactionPrivate GdaTransactionPrivate;


gda_transaction_new ()

GdaTransaction*     gda_transaction_new                 (const gchar *name);

Creates a new GdaTransaction 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.

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;


gda_transaction_get_isolation_level ()

GdaTransactionIsolation gda_transaction_get_isolation_level
                                                        (GdaTransaction *xaction);

Gets the isolation level for the given transaction. This specifies the locking behavior for the database connection during the given transaction.

xaction :

a GdaTransaction object.

Returns :

the isolation level.

gda_transaction_set_isolation_level ()

void                gda_transaction_set_isolation_level (GdaTransaction *xaction,
                                                         GdaTransactionIsolation level);

Sets the isolation level for the given transaction.

xaction :

a GdaTransaction object.

level :

the isolation level.

gda_transaction_get_name ()

const gchar*        gda_transaction_get_name            (GdaTransaction *xaction);

Retrieves the name of the given transaction, as specified by the client application (via a non-NULL parameter in the call to gda_transaction_new, or by calling gda_transaction_set_name). Note that some providers may set, when you call gda_connection_begin_transaction, the name of the transaction if it's not been specified by the client application, so this function may return, for some providers, values that you don't expect.

xaction :

a GdaTransaction object.

Returns :

the name of the transaction.

gda_transaction_set_name ()

void                gda_transaction_set_name            (GdaTransaction *xaction,
                                                         const gchar *name);

Sets the name of the given transaction. This is very useful when using providers that support named transactions.

xaction :

a GdaTransaction object.

name :

new name for the transaction.