Help us shape the future of Go! Take the 2026 Go Developer Survey

sqliteutil

package
v1.32.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiagnoseDBOpenError

func DiagnoseDBOpenError(path string, originalErr error) error

DiagnoseDBOpenError provides a more helpful error message when SQLite fails to open/create a database file.

func IsCantOpenError

func IsCantOpenError(err error) bool

IsCantOpenError checks if the error is a SQLite CANTOPEN error (code 14).

func IsNoSuchColumnError

func IsNoSuchColumnError(err error) bool

IsNoSuchColumnError checks if the error is due to a missing column in SQLite. This typically happens when querying a column that doesn't exist in the schema.

func OpenDB

func OpenDB(path string) (*sql.DB, error)

OpenDB opens a SQLite database with recommended pragmas for concurrency and foreign key support. It configures the connection pool for serialized writes (MaxOpenConns=1).

Types

This section is empty.

Jump to

Keyboard shortcuts

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