Help us shape the future of Go! Take the 2026 Go Developer Survey

engine

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package engine is the query planner: IR in, Plan out. It is pure and stateless apart from the loaded runtime model; execution lives in the language-native executors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	M *runtimemodel.Model
	P *planner.Planner
}

Engine binds a runtime model to a dialect.

func Load

func Load(manifestText, dialectName string) (*Engine, error)

Load returns the dialect's engine, built as a runtime model from the manifest text. Malformed manifest text is SCHEMA_INVALID.

func New

func New(m *runtimemodel.Model, dialectName string) (*Engine, error)

New builds an engine for the given dialect name.

func (*Engine) Compile

func (e *Engine) Compile(irJSON []byte) ([]byte, error)

Compile validates the IR and returns the plan as JSON.

func (*Engine) Validate added in v0.0.19

func (e *Engine) Validate(req *ir.Request) error

Validate checks an already-built request without compiling its plan.

Directories

Path Synopsis
Package dbspec parses, validates and emits dbspec documents, the schema language that docs/spec/dbspec.md specifies.
Package dbspec parses, validates and emits dbspec documents, the schema language that docs/spec/dbspec.md specifies.
Package dialect renders the database-specific pieces of SQL.
Package dialect renders the database-specific pieces of SQL.
internal
meet
Package meet holds the one table of which two columns compare alike on the three databases.
Package meet holds the one table of which two columns compare alike on the three databases.
Package ir defines the wire form clients send (JSON, docs/spec/protocol.md) and validates it against the manifest.
Package ir defines the wire form clients send (JSON, docs/spec/protocol.md) and validates it against the manifest.
Package plan is what executors run: SQL text with bind slots and an assembly spec.
Package plan is what executors run: SQL text with bind slots and an assembly spec.
Package planner turns a validated IR request into a Plan.
Package planner turns a validated IR request into a Plan.
Package runtimemodel builds the runtime model of a dbspec document set (docs/spec/dbspec.md, "Runtime model").
Package runtimemodel builds the runtime model of a dbspec document set (docs/spec/dbspec.md, "Runtime model").

Jump to

Keyboard shortcuts

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