Documentation
¶
Overview ¶
Package sqlitedsn tunes SQLite DSNs (mattn/go-sqlite3 parameter names) for concurrent use. AI Studio (pkg/studio/sqlitedb) and the microgateway open file databases through it. It is plain string handling, so importing it does not link the cgo driver.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilePath ¶
FilePath returns the database file a SQLite DSN opens, or false for an in-memory database.
func IsInMemory ¶
IsInMemory reports whether dsn opens an in-memory database.
func Normalize ¶
Normalize tunes a file-backed SQLite DSN for concurrent use: it adds the defaults above unless the DSN sets them. It reports whether it removed cache=shared.
Shared-cache mode is dropped for file databases. It makes SQLite lock whole tables across connections and report contention as SQLITE_LOCKED ("database table is locked"), which busy_timeout does not retry. Shared cache only helps in-memory databases, where it lets several connections see one database; those DSNs are returned unchanged.
Types ¶
This section is empty.