sqliteconn

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package sqliteconn opens SQLite connections that run a fixed set of statements, usually pragmas, on every connection the pool opens. It has no Shisho imports, so both pkg/database and pkg/testutils/testdb can use it.

Pragmas such as foreign_keys and busy_timeout apply only to the connection that ran them. database/sql discards a connection whose query is canceled mid-statement and opens a replacement with SQLite's defaults, so running them once at startup is not enough.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnector

func NewConnector(dsn string, statements ...string) (driver.Connector, error)

NewConnector returns a connector for dsn on the sqliteshim driver that runs statements, in order, on each new connection before handing it out.

Types

This section is empty.

Jump to

Keyboard shortcuts

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