aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/database/database.h
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-10-10 10:58:40 +0200
committerTobias Brunner <tobias@strongswan.org>2013-10-11 15:29:10 +0200
commitb283a6e9efd2ff16ec5b189435604b0d82d714cd (patch)
tree8b80b4c9249b2e1a51ac555a9e7c5f035524f55e /src/libstrongswan/database/database.h
parente745f5f69ff524cae7a2e34199c01f1dd1e4294e (diff)
downloadstrongswan-b283a6e9efd2ff16ec5b189435604b0d82d714cd.tar.bz2
strongswan-b283a6e9efd2ff16ec5b189435604b0d82d714cd.tar.xz
database: Add support for serializable transactions
Diffstat (limited to 'src/libstrongswan/database/database.h')
-rw-r--r--src/libstrongswan/database/database.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libstrongswan/database/database.h b/src/libstrongswan/database/database.h
index 77d4da144..ad5ccf95e 100644
--- a/src/libstrongswan/database/database.h
+++ b/src/libstrongswan/database/database.h
@@ -115,6 +115,10 @@ struct database_t {
/**
* Start a transaction.
*
+ * A serializable transaction forces a strict separation between other
+ * transactions. Due to the performance overhead they should only be used
+ * in certain situations (e.g. SELECT->INSERT|UPDATE).
+ *
* @note Either commit() or rollback() has to be called to end the
* transaction.
* @note Transactions are thread-specific. So commit()/rollbak() has to be
@@ -124,9 +128,10 @@ struct database_t {
* not supported. So if any if the "inner" transactions are rolled back
* the outer most transaction is rolled back.
*
- * @return TRUE on success
+ * @param serializable TRUE to create a serializable transaction
+ * @return TRUE on success
*/
- bool (*transaction)(database_t *this);
+ bool (*transaction)(database_t *this, bool serializable);
/**
* Commit all changes made during the current transaction.