| 243 | } |
| 244 | |
| 245 | void db_changes_add(struct db_stmt *stmt, const char * expanded) |
| 246 | { |
| 247 | struct db *db = stmt->db; |
| 248 | |
| 249 | if (stmt->query->readonly) { |
| 250 | return; |
| 251 | } |
| 252 | /* We get a "COMMIT;" after we've sent our changes. */ |
| 253 | if (!db->changes) { |
| 254 | assert(streq(expanded, "COMMIT;")); |
| 255 | return; |
| 256 | } |
| 257 | |
| 258 | tal_arr_expand(&db->changes, tal_strdup(db->changes, expanded)); |
| 259 | } |
| 260 | |
| 261 | void db_assert_no_outstanding_statements(struct db *db) |
| 262 | { |
no outgoing calls
no test coverage detected