mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
db: catch SQL errors unless we're expecting them.
I couldn't figure out why my new SQL query was returning 0 rows, and it was because we were ignoring errors. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -49,7 +49,12 @@ bool db_exec_prepared_v2(struct db_stmt *stmt TAKES);
|
||||
*
|
||||
* @stmt: The prepared statement to execute
|
||||
*/
|
||||
bool db_query_prepared(struct db_stmt *stmt);
|
||||
void db_query_prepared(struct db_stmt *stmt);
|
||||
|
||||
/**
|
||||
* Variation which allows failure.
|
||||
*/
|
||||
bool db_query_prepared_canfail(struct db_stmt *stmt);
|
||||
|
||||
size_t db_count_changes(struct db_stmt *stmt);
|
||||
void db_report_changes(struct db *db, const char *final, size_t min);
|
||||
|
||||
Reference in New Issue
Block a user