| 472 | } |
| 473 | |
| 474 | bool invoices_delete_description(struct invoices *invoices, u64 inv_dbid, |
| 475 | const struct json_escape *label, |
| 476 | const char *description) |
| 477 | { |
| 478 | struct db_stmt *stmt; |
| 479 | int changes; |
| 480 | |
| 481 | stmt = db_prepare_v2(invoices->wallet->db, |
| 482 | SQL("UPDATE invoices" |
| 483 | " SET description = NULL," |
| 484 | " updated_index = ?" |
| 485 | " WHERE ID = ?;")); |
| 486 | db_bind_u64(stmt, |
| 487 | invoice_index_update_deldesc(invoices->wallet->ld, |
| 488 | label, description)); |
| 489 | db_bind_u64(stmt, inv_dbid); |
| 490 | db_exec_prepared_v2(stmt); |
| 491 | |
| 492 | changes = db_count_changes(stmt); |
| 493 | tal_free(stmt); |
| 494 | |
| 495 | return changes == 1; |
| 496 | } |
| 497 | |
| 498 | struct db_stmt *invoices_first(struct invoices *invoices, |
| 499 | const enum wait_index *listindex, |
nothing calls this directly
no test coverage detected