| 215 | } |
| 216 | |
| 217 | u64 db_last_insert_id_v2(struct db_stmt *stmt TAKES) |
| 218 | { |
| 219 | u64 id; |
| 220 | assert(stmt->executed); |
| 221 | id = stmt->db->config->last_insert_id_fn(stmt); |
| 222 | |
| 223 | tal_free_if_taken(stmt); |
| 224 | |
| 225 | return id; |
| 226 | } |
| 227 | |
| 228 | /* We expect min changes (ie. BEGIN TRANSACTION): report if more. |
| 229 | * Optionally add "final" at the end (ie. COMMIT). */ |
no test coverage detected