noop

package
v6.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package noop provides a no-op database driver that discards all operations without performing any I/O. It is intended for benchmarking stroppy's own framework overhead in isolation from actual database latency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver is a no-op implementation of driver.Driver. Every method runs the full stroppy framework stack (data generation, argument processing, transaction bookkeeping) but discards the final I/O.

func NewDriver

func NewDriver(opts driver.Options) *Driver

func (*Driver) Begin

func (d *Driver) Begin(
	ctx context.Context,
	isolation config.TxIsolationLevel,
) (driver.Tx, error)

func (*Driver) ClassifyError

func (*Driver) ClassifyError(err error) driver.ErrorFacts

func (*Driver) Insert

func (d *Driver) Insert(
	ctx context.Context,
	req *driver.InsertRequest,
) (*stats.Query, error)

Insert runs a typed driver.InsertRequest through the noop driver. It exercises generation, batch filling, and row materialization before discarding rows without I/O, exposing framework overhead. Every method is accepted because there is no I/O to gate on; the point is to scale row generation alone.

func (*Driver) RunQuery

func (d *Driver) RunQuery(
	ctx context.Context,
	sqlStr string,
	args map[string]any,
) (*driver.QueryResult, error)

func (*Driver) Teardown

func (d *Driver) Teardown(_ context.Context) error

Jump to

Keyboard shortcuts

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