summaryrefslogtreecommitdiff
path: root/src/cmd_util.h
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-20 21:55:04 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-20 22:02:57 +0200
commitceff3d26732a7fde2f66df0270269d3bebcfabf7 (patch)
tree4ad6677617cae9de4aa4b5b42352a7a8cf29a3e9 /src/cmd_util.h
parent10a535ace098144980d0ffd1593f6384c39cc221 (diff)
downloadbokf-ceff3d26732a7fde2f66df0270269d3bebcfabf7.tar.gz
bokf-ceff3d26732a7fde2f66df0270269d3bebcfabf7.zip
commands: shared DB-error helpers
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/cmd_util.h')
-rw-r--r--src/cmd_util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd_util.h b/src/cmd_util.h
index 4113eb2..ccab9f4 100644
--- a/src/cmd_util.h
+++ b/src/cmd_util.h
@@ -22,6 +22,9 @@ int command_validate_args(const struct command *cmd, yyjson_val *args,
yyjson_mut_val *fail(struct req *r, const char *code, const char *msg);
yyjson_mut_val *failf(struct req *r, const char *code, const char *fmt, ...)
__attribute__((format(printf, 3, 4)));
+yyjson_mut_val *db_error(struct req *r);
+yyjson_mut_val *db_sqlite_error(struct req *r);
+void bind_text_or_null(sqlite3_stmt *st, int idx, const char *s);
int mkdir_p(const char *path, mode_t mode);
yyjson_mut_val *json_to_mut(yyjson_mut_doc *doc, const char *json);
int is_digits(const char *s);