summaryrefslogtreecommitdiff
path: root/include/urweb
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-12-23 15:59:17 +0000
committerGravatar Adam Chlipala <adam@chlipala.net>2013-12-23 15:59:17 +0000
commitfac05ae0a6d7d080436c953d2085e137d75c5796 (patch)
tree710b0b096b788b1fb51c6222c97cc30632f0f964 /include/urweb
parent2f6649aa0b392fefe08e3eb604a93220a0c64324 (diff)
Proper handling of serialization failures during SQL COMMIT
Diffstat (limited to 'include/urweb')
-rw-r--r--include/urweb/urweb_cpp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/urweb/urweb_cpp.h b/include/urweb/urweb_cpp.h
index 8dfffdf9..248e54e4 100644
--- a/include/urweb/urweb_cpp.h
+++ b/include/urweb/urweb_cpp.h
@@ -40,7 +40,8 @@ failure_kind uw_begin(struct uw_context *, char *path);
void uw_ensure_transaction(struct uw_context *);
failure_kind uw_begin_onError(struct uw_context *, char *msg);
void uw_login(struct uw_context *);
-void uw_commit(struct uw_context *);
+int uw_commit(struct uw_context *);
+// ^-- returns nonzero if the transaction should be restarted
int uw_rollback(struct uw_context *, int will_retry);
__attribute__((noreturn)) void uw_error(struct uw_context *, failure_kind, const char *fmt, ...);