fixture

package
v0.4.0-rc.12 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fixture runs bounded, customer-supplied SQL transform fixtures without providers.

Index

Constants

View Source
const MaxBytes = 1 << 20

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	Step    string `json:"step"`
	Field   string `json:"field,omitempty"`
	Code    string `json:"code"`
	Message string `json:"message"`
}

type Fixture

type Fixture struct {
	Inputs   map[string]json.RawMessage `json:"inputs"`
	Expected json.RawMessage            `json:"expected,omitempty"`
}

func Decode

func Decode(raw []byte) (Fixture, error)

Decode reads a single fixture file without exposing parse details or values.

type Result

type Result struct {
	Passed      bool            `json:"passed"`
	Asserted    bool            `json:"asserted"`
	Step        string          `json:"step"`
	Scope       string          `json:"scope"`
	Output      json.RawMessage `json:"output,omitempty"`
	Columns     []string        `json:"columns,omitempty"`
	Diagnostics []Diagnostic    `json:"diagnostics"`
}

func Failure

func Failure(step, code, message string) Result

func Run

func Run(ctx context.Context, step string, transform transformsql.Transform, fixture Fixture) Result

Run executes the pipeline SQL runtime and its existing contract checks. Output is returned only after contract success; failures never echo fixture values.

Jump to

Keyboard shortcuts

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