conformance

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 1 Imported by: ? modules, 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 conformance holds the value corpus this repository checks SQLite round-trips byte-for-byte, and the SQL expression cases whose results must agree across implementations.

It is a separate package with no dependency on the binding so that anything can drive it: this repository's own test suite, and the bake-off under bench/, which runs the same corpus through competing SQLite drivers to check that they agree with each other and with upstream.

The value corpus is not a random sample. Every entry is a class that has been observed to survive a naive implementation's tests and then lose data in production: text carrying real newlines, embedded NUL, characters outside the basic multilingual plane, and byte sequences that are not valid UTF-8 at all. Invisible characters are written as escapes so that what the corpus tests is legible in the source rather than only in a hex dump.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capability

type Capability struct {
	Name string
	SQL  string
}

Capability is a probe whose answer legitimately differs between SQLite builds: which optional modules are compiled in, which threading mode, which version. These are reported rather than asserted -- a build without FTS5 is a different build, not a wrong one -- and the differences are exactly what a comparison between implementations needs to surface.

func Capabilities

func Capabilities() []Capability

Capabilities is the build-configuration probe set.

type Expr

type Expr struct {
	Name string
	SQL  string
	Want string // result rendered as text
}

Expr is a SQL expression whose single-column result every implementation must agree on. These check the semantics a shared SQLite gives you -- integer range, floating-point rendering, type affinity, NULL propagation, and the compiled-in function set -- rather than the transport.

func Exprs

func Exprs() []Expr

Exprs is the expression corpus.

type Value

type Value struct {
	Name string
	Text string
	Blob []byte
}

Value is one round-trip case: a name, the text to store in a TEXT column, and the bytes to store in a BLOB column.

func Values

func Values() []Value

Values is the round-trip corpus. Storing Text in a TEXT column and Blob in a BLOB column and reading both back must return exactly what went in, byte for byte, with no truncation at a NUL and no normalization of anything.

Jump to

Keyboard shortcuts

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