| 1846 | * a four-column INSERT still "works", it just silently indexes no prose. */ |
| 1847 | |
| 1848 | static int fts_match_count(cbm_store_t *s, const char *match) { |
| 1849 | sqlite3 *db = cbm_store_get_db(s); |
| 1850 | sqlite3_stmt *st = NULL; |
| 1851 | if (sqlite3_prepare_v2(db, "SELECT COUNT(*) FROM nodes_fts WHERE nodes_fts MATCH ?1", -1, &st, |
| 1852 | NULL) != SQLITE_OK) { |
| 1853 | return -1; |
| 1854 | } |
| 1855 | sqlite3_bind_text(st, 1, match, -1, SQLITE_TRANSIENT); |
| 1856 | int n = sqlite3_step(st) == SQLITE_ROW ? sqlite3_column_int(st, 0) : -1; |
| 1857 | sqlite3_finalize(st); |
| 1858 | return n; |
| 1859 | } |
| 1860 | |
| 1861 | /* One Section carrying prose, one Function carrying none. */ |
| 1862 | static void seed_prose_nodes(cbm_store_t *s) { |
no test coverage detected