| 366 | } |
| 367 | |
| 368 | void db_col_node_id(struct db_stmt *stmt, const char *colname, struct node_id *dest) |
| 369 | { |
| 370 | size_t col = db_query_colnum(stmt, colname); |
| 371 | |
| 372 | assert(db_column_bytes(stmt, col) == sizeof(dest->k)); |
| 373 | memcpy(dest->k, db_column_blob(stmt, col), sizeof(dest->k)); |
| 374 | } |
| 375 | |
| 376 | /* We don't assume sizeof(struct node_id) == sizeof(struct node_id.k), |
| 377 | * otherwise this would simply be a call to db_col_arr! |
no test coverage detected