sqlitedsn

package
v2.3.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: AGPL-3.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func FilePath(dsn string) (string, bool)

FilePath returns the database file a SQLite DSN opens, or false for an in-memory database.

func IsInMemory

func IsInMemory(dsn string) bool

IsInMemory reports whether dsn opens an in-memory database.

func Normalize

func Normalize(dsn string) (string, bool)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL