checkcore

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package checkcore provides the core query-validation logic shared by the check subcommand and the MCP server tools. It is pure: no I/O, no filesystem access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name     string `json:"name"`
	GoType   string `json:"goType"`
	Nullable bool   `json:"nullable"`
}

Column is the stable wire representation of one result column from a validated SQL query.

type Result

type Result struct {
	Columns     []Column
	Diagnostics []queryanalyzer.Diagnostic
}

Result holds the outcome of a single query validation: the resolved result columns plus any static-analysis / oracle diagnostics.

func Check

func Check(
	ctx context.Context,
	catalog *model.Catalog,
	eng engine.Engine,
	columnOverrides map[string]config.ColumnOverride,
	customTypes []config.CustomTypeMapping,
	sql string,
) Result

Check validates and types a single ad-hoc SQL query against catalog using the static analyzer and the SQLite verify oracle. It is pure: it performs no I/O beyond the in-memory SQLite instance used by the oracle.

Jump to

Keyboard shortcuts

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