| 458 | } |
| 459 | |
| 460 | void db_col_amount_msat_or_default(struct db_stmt *stmt, |
| 461 | const char *colname, |
| 462 | struct amount_msat *msat, |
| 463 | struct amount_msat def) |
| 464 | { |
| 465 | size_t col = db_query_colnum(stmt, colname); |
| 466 | |
| 467 | if (db_column_is_null(stmt, col)) |
| 468 | *msat = def; |
| 469 | else |
| 470 | msat->millisatoshis = db_col_u64(stmt, colname); /* Raw: low level function */ |
| 471 | } |
| 472 | |
| 473 | void db_col_amount_msat(struct db_stmt *stmt, const char *colname, |
| 474 | struct amount_msat *msat) |
no test coverage detected