dreltest

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Begin

func Begin(t *testing.T, engine *drel.Engine) *drel.Engine

Begin starts a savepoint-based transaction scope that auto-rolls back when the test completes. This provides per-test isolation without recreating the database schema.

Uses SQLite SAVEPOINTs for isolation since SQLite only supports a single active transaction.

func NewSQLite

func NewSQLite(t *testing.T) *drel.Engine

NewSQLite creates an in-memory SQLite engine for testing. The engine is automatically closed when the test completes.

Types

type Option

type Option func(*config)

Option configures NewSQLiteWith.

func WithSeed

func WithSeed(fn func(*drel.Engine)) Option

WithSeed runs a seed function after the database is created.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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