You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
- `prepareFTSQuery` collapses to the canonical phrase-wrap escape
documented by SQLite's FTS5 author: each whitespace-separated token
becomes a quoted phrase (with internal `"` doubled) suffixed with `*`
for prefix matching, AND-joined. The output is always syntactically
valid, so `isFTSSyntaxError`, balanced-delimiter validation, and the
safe-fallback helper all delete. Drops user-facing FTS5 operator support
(AND/OR/NOT/parens/quotes); partial operator syntax mid-keystroke
errored anyway in a type-as-you-go search box.
- `isNetworkError` matches via `errors.Is` against
`syscall.ECONNREFUSED`, `ENETUNREACH`, and `EHOSTUNREACH` -- nothing
else. Go's `syscall` package maps platform-specific connection errors to
these cross-platform sentinels, so this works on Linux, macOS, and
Windows alike.
- Doc claim about FTS5 operators removed to match the new behavior.
- Two existing tests in `client_test.go` previously fabricated bare
connection errors via `errors.New("dial tcp: connection refused")`;
updated to wrap real `syscall.ECONNREFUSED` so they exercise the same
path production traffic hits.
Reference: [SQLite forum — escaping punctuation in FTS queries (Dan
Kennedy)](https://sqlite.org/forum/info/82344cab7c5806980b287ce008975c6585d510e95ac7199de398ff9051ae0907)
0 commit comments