sqltest

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package sqltest holds helpers for SQL backend tests and benchmarks that need large fixtures written faster than the storage API allows.

Why

The phase 4 exit criterion that Clear on 100k queued rows finishes under a second on PostgreSQL (decision record 0012) needs 100k rows first, and enqueueing them one at a time through the store would dominate the benchmark. Seed inserts pending commands for an enrollment with multi-row INSERTs sized to stay under PostgreSQL's parameter limit, through the backend's own Dialect.

It is not part of the storage contract: nothing here is a behaviour a backend must have, and only the sqlite and postgres tests import it.

References

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Seed

func Seed(ctx context.Context, tb testing.TB, db *sql.DB, d sqlcommon.Dialect, id string, n int)

Seed inserts n pending ProfileList commands for the enrollment id using multi-row INSERTs. The enrollment row must already exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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