Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1937:94f9570671f0 | 1938:d02c1a0d8082 |
---|---|
38 void uw_set_env(struct uw_context *, char *(*get_env)(void *, const char *), void *get_env_data); | 38 void uw_set_env(struct uw_context *, char *(*get_env)(void *, const char *), void *get_env_data); |
39 failure_kind uw_begin(struct uw_context *, char *path); | 39 failure_kind uw_begin(struct uw_context *, char *path); |
40 void uw_ensure_transaction(struct uw_context *); | 40 void uw_ensure_transaction(struct uw_context *); |
41 failure_kind uw_begin_onError(struct uw_context *, char *msg); | 41 failure_kind uw_begin_onError(struct uw_context *, char *msg); |
42 void uw_login(struct uw_context *); | 42 void uw_login(struct uw_context *); |
43 void uw_commit(struct uw_context *); | 43 int uw_commit(struct uw_context *); |
44 // ^-- returns nonzero if the transaction should be restarted | |
44 int uw_rollback(struct uw_context *, int will_retry); | 45 int uw_rollback(struct uw_context *, int will_retry); |
45 | 46 |
46 __attribute__((noreturn)) void uw_error(struct uw_context *, failure_kind, const char *fmt, ...); | 47 __attribute__((noreturn)) void uw_error(struct uw_context *, failure_kind, const char *fmt, ...); |
47 char *uw_error_message(struct uw_context *); | 48 char *uw_error_message(struct uw_context *); |
48 void uw_set_error_message(struct uw_context *, const char *fmt, ...); | 49 void uw_set_error_message(struct uw_context *, const char *fmt, ...); |