| 539 | } |
| 540 | |
| 541 | void db_col_amount_msat_or_default(struct db_stmt *stmt, |
| 542 | const char *colname, |
| 543 | struct amount_msat *msat, |
| 544 | struct amount_msat def) |
| 545 | { |
| 546 | size_t col = db_query_colnum(stmt, colname); |
| 547 | |
| 548 | if (db_column_is_null(stmt, col)) |
| 549 | *msat = def; |
| 550 | else |
| 551 | msat->millisatoshis = db_col_u64(stmt, colname); /* Raw: low level function */ |
| 552 | } |
| 553 | |
| 554 | struct amount_msat db_col_amount_msat(struct db_stmt *stmt, const char *colname) |
| 555 | { |
no test coverage detected