|
VSQLite++ 0.3
|
Functions | |
| bool | available (connection &con) |
| Detects whether the connected SQLite build exposes the FTS5 extension. | |
| std::string | match_expression (std::string_view column_or_table, std::string_view query_expr="?") |
| Builds a SQL MATCH expression for FTS tables or columns. | |
| void | register_rank_function (connection &con, std::string_view function_name="fts_rank") |
| Registers a custom ranking function compatible with fts5 queries. | |
| bool sqlite::v2::fts::available | ( | connection & | con | ) |
Detects whether the connected SQLite build exposes the FTS5 extension.
| std::string sqlite::v2::fts::match_expression | ( | std::string_view | column_or_table, |
| std::string_view | query_expr = "?" ) |
Builds a SQL MATCH expression for FTS tables or columns.
| column_or_table | Identifier on the left-hand side of MATCH. |
| query_expr | SQL expression for the right-hand side (defaults to a parameter placeholder). |
| void sqlite::v2::fts::register_rank_function | ( | connection & | con, |
| std::string_view | function_name = "fts_rank" ) |
Registers a custom ranking function compatible with fts5 queries.
The installed function uses a simple heuristic that counts matched phrases, and can be referenced inside ORDER BY clauses as fts_rank(matchinfo).
| con | Connection with FTS5 available. |
| function_name | Optional SQL symbol name (defaults to fts_rank). |
| database_exception | when FTS5 is unavailable or registration fails. |