sqliteutil

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package sqliteutil provides SQLite connection configuration for initialization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithoutBusyTimeout

func WithoutBusyTimeout(ctx context.Context, conn *sql.Conn, operation func() error) (err error)

WithoutBusyTimeout lets an operation retry SQLITE_BUSY using its context instead of waiting inside SQLite's busy handler. The caller must exclusively own conn until this function returns. Its previous timeout is restored before reuse, including after cancellation; a failed restoration discards conn.

This works around context-insensitive busy waits in the pinned sqlite v1.40.1: https://gitlab.com/cznic/sqlite/-/issues/262 (fixed upstream in v1.61.0). Remove it after adopting a fixed driver release and confirming the producer WAL/migration lock-cancellation tests pass with the normal busy timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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