| 136 | } |
| 137 | |
| 138 | bool db_query_prepared(struct db_stmt *stmt) |
| 139 | { |
| 140 | /* Make sure we don't accidentally execute a modifying query using a |
| 141 | * read-only path. */ |
| 142 | bool ret; |
| 143 | assert(stmt->query->readonly); |
| 144 | ret = stmt->db->config->query_fn(stmt); |
| 145 | stmt->executed = true; |
| 146 | list_del_from(&stmt->db->pending_statements, &stmt->list); |
| 147 | return ret; |
| 148 | } |
| 149 | |
| 150 | bool db_step(struct db_stmt *stmt) |
| 151 | { |