costtest

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package costtest holds hand-written fakes of the cost interfaces for tests: an Explainer and an EXPLAIN ANALYZE sampler answering as configured.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeAnalyzeSampler

type FakeAnalyzeSampler struct {
	Plan cost.Plan
	Err  error
}

FakeAnalyzeSampler is a hand-written cost.AnalyzeSampler for tests.

func (FakeAnalyzeSampler) ExplainAnalyze

ExplainAnalyze returns the configured Plan/Err.

type FakeExplainer

type FakeExplainer struct {
	Plan cost.Plan
	Err  error
}

FakeExplainer is a hand-written cost.Explainer for tests.

func (FakeExplainer) Explain

func (f FakeExplainer) Explain(_ context.Context, _ string, _ []any) (cost.Plan, error)

Explain returns the configured Plan/Err.

Jump to

Keyboard shortcuts

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