MCPcopy
hub / github.com/kenn-io/msgvault / SQLiteEngine

Struct SQLiteEngine

internal/query/sqlite.go:20–29  ·  view source on GitHub ↗

SQLiteEngine implements Engine using direct SQL queries. Despite its name, it is dialect-agnostic and supports both SQLite (default) and PostgreSQL via the dialect field.

Source from the content-addressed store, hash-verified

18// Despite its name, it is dialect-agnostic and supports both SQLite
19// (default) and PostgreSQL via the dialect field.
20type SQLiteEngine struct {
21 db *sql.DB
22 dialect Dialect
23
24 // FTS availability cache - thread-safe with mutex.
25 // Only caches successful checks; errors cause retries on next call.
26 ftsMu sync.Mutex
27 ftsResult bool
28 ftsChecked bool
29}
30
31// NewSQLiteEngine creates a new SQLite-backed query engine.
32func NewSQLiteEngine(db *sql.DB) *SQLiteEngine {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected