sqlitetest

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: EUPL-1.2 Imports: 6 Imported by: 0

Documentation

Overview

Package sqlitetest provides a helper for opening in-memory SQLite test databases with consistent configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenDB

func OpenDB(t *testing.T) *bun.DB

OpenDB returns an in-memory SQLite *bun.DB for testing. It uses a single connection (SetMaxOpenConns(1)) to ensure all operations within a test see the same data without needing shared cache mode. The database is closed automatically when the test finishes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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