Mercurial > urweb
diff include/urweb/urweb_cpp.h @ 1938:d02c1a0d8082
Proper handling of serialization failures during SQL COMMIT
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Mon, 23 Dec 2013 15:59:17 +0000 |
parents | 6745eafff617 |
children | ac1be85e91ad |
line wrap: on
line diff
--- a/include/urweb/urweb_cpp.h Tue Dec 17 20:12:33 2013 -0500 +++ b/include/urweb/urweb_cpp.h Mon Dec 23 15:59:17 2013 +0000 @@ -40,7 +40,8 @@ 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, ...);