| 255 | |
| 256 | |
| 257 | u64 db_col_u64(struct db_stmt *stmt, const char *colname) |
| 258 | { |
| 259 | size_t col = db_query_colnum(stmt, colname); |
| 260 | |
| 261 | if (db_column_null_warn(stmt, colname, col)) |
| 262 | return 0; |
| 263 | |
| 264 | return stmt->db->config->column_u64_fn(stmt, col); |
| 265 | } |
| 266 | |
| 267 | int db_col_int_or_default(struct db_stmt *stmt, const char *colname, int def) |
| 268 | { |