soju/database
delthas 0ee94759f7 Fix SEARCH queries with special characters on SQLite
Previously, we would pass SQLite FTS5 MATCH queries as is from the
SEARCH parameter, when searching for messages.

By default FTS5 queries follow a specific syntax, e.g. AND, OR, ...
can be used to filter searches logically.

Passing special characters in these unescaped queries, like `.`,
would be rejected by SQLite, failing the SEARCH request.

Here, in order to replicate PostgreSQL and FS behavior, we simply
want to search for the string as is, and not give it glob or logic
operators semantics.

To do that, we quote each token of the string, skipping over
separators.
2023-08-02 15:19:38 +02:00
..
database.go Rate limit Web Push checks 2023-02-18 13:27:13 +01:00
postgres_test.go Add support for explicit PostgreSQL schema prefixes for tests 2023-02-17 14:13:43 +01:00
postgres.go database/postgres: fix StoreNetwork positional arguments 2023-02-18 15:42:00 +01:00
sqlite_mattn.go Add a database store for messages 2023-02-17 14:13:43 +01:00
sqlite_modernc.go Add build tag for modernc/sqlite driver 2022-09-26 19:31:43 +02:00
sqlite_stub.go database/sqlite: make optional 2022-09-11 13:57:00 +02:00
sqlite_test.go Add build tag for modernc/sqlite driver 2022-09-26 19:31:43 +02:00
sqlite.go Fix SEARCH queries with special characters on SQLite 2023-08-02 15:19:38 +02:00