| 200 | } |
| 201 | |
| 202 | u64 db_last_insert_id_v2(struct db_stmt *stmt TAKES) |
| 203 | { |
| 204 | u64 id; |
| 205 | assert(stmt->executed); |
| 206 | id = stmt->db->config->last_insert_id_fn(stmt); |
| 207 | |
| 208 | if (taken(stmt)) |
| 209 | tal_free(stmt); |
| 210 | |
| 211 | return id; |
| 212 | } |
| 213 | |
| 214 | /* We expect min changes (ie. BEGIN TRANSACTION): report if more. |
| 215 | * Optionally add "final" at the end (ie. COMMIT). */ |
no test coverage detected