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