dbtest

package
v0.0.0-...-36d6306 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableForeignKeys

func EnableForeignKeys(ctx context.Context, db *sql.DB) error

EnableForeignKeys enables SQLite foreign key enforcement on db. It must be called after SetMaxOpenConns(1) so the PRAGMA applies to every connection. PRAGMA is a SQLite connection directive — there is no sqlc-generated equivalent.

func GetTestDB

func GetTestDB(ctx context.Context) (*sql.DB, error)

func GetTestPreparedQueries

func GetTestPreparedQueries(ctx context.Context) (*gen.Queries, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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