Midgard2 Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <midgard/midgard.h> struct MidgardTransactionClass; struct MidgardTransaction; MidgardTransaction * midgard_transaction_new (MidgardConnection *mgd
); gboolean midgard_transaction_begin (MidgardTransaction *self
); gboolean midgard_transaction_commit (MidgardTransaction *self
); gboolean midgard_transaction_rollback (MidgardTransaction *self
); gboolean midgard_transaction_get_status (MidgardTransaction *self
); const gchar * midgard_transaction_get_name (MidgardTransaction *self
);
struct MidgardTransactionClass { GObjectClass parent; /* class members */ gboolean (*begin) (MidgardTransaction *self); gboolean (*commit) (MidgardTransaction *self); gboolean (*rollback) (MidgardTransaction *self); gboolean (*get_status) (MidgardTransaction *self); const gchar *(*get_name) (MidgardTransaction *self); };
Since 9.09
MidgardTransaction * midgard_transaction_new (MidgardConnection *mgd
);
|
MidgardConnection instance |
Returns : |
New MidgardTransaction instance or NULL on failure |
Since 9.09
gboolean midgard_transaction_begin (MidgardTransaction *self
);
Begins new, underlying database provider's transaction. In case of error, MidgardConnection error is set to MGD_ERR_INTERNAL.
|
MidgardTransaction instance |
Returns : |
TRUE on success, FALSE otherwise. |
Since 9.09
gboolean midgard_transaction_commit (MidgardTransaction *self
);
In case of error, MidgardConnection error is set to MGD_ERR_INTERNAL.
|
MidgardTransaction instance |
Returns : |
TRUE on success, FALSE otherwise |
Since 9.09
gboolean midgard_transaction_rollback (MidgardTransaction *self
);
In case of error, MidgardConnection error is set to MGD_ERR_INTERNAL
|
MidgardTransaction instance |
Returns : |
TRUE on success, FALSE otherwise. |
Since 9.09
gboolean midgard_transaction_get_status (MidgardTransaction *self
);
Returns transaction status. FALSE
means, any transaction operation failed.
No MidgardConnection error is set in case of error.
|
MidgardTransaction instance |
Returns : |
TRUE on success, FALSE otherwise |
Since 9.09
const gchar * midgard_transaction_get_name (MidgardTransaction *self
);
|
MidgardTransaction instance |
Returns : |
unique name which identifies given transaction. |
Since 9.09
"connection"
property"connection" MidgardConnection* : Write / Construct Only
Pointer to MidgardConnection, given object has been initialized for