Provides replication and hook interface for raw SQL too */
| 118 | |
| 119 | /* Provides replication and hook interface for raw SQL too */ |
| 120 | struct db_stmt *db_prepare_untranslated(struct db *db, const char *query) |
| 121 | { |
| 122 | struct db_query *db_query = tal(NULL, struct db_query); |
| 123 | struct db_stmt *stmt; |
| 124 | |
| 125 | db_query->name = db_query->query = query; |
| 126 | db_query->placeholders = strcount(query, "?"); |
| 127 | db_query->readonly = false; |
| 128 | |
| 129 | /* Use raw accessors! */ |
| 130 | db_query->colnames = NULL; |
| 131 | db_query->num_colnames = 0; |
| 132 | |
| 133 | stmt = db_prepare_core(db, "db_prepare_untranslated", db_query); |
| 134 | tal_steal(stmt, db_query); |
| 135 | return stmt; |
| 136 | } |
| 137 | |
| 138 | bool db_query_prepared(struct db_stmt *stmt) |
| 139 | { |
no test coverage detected