execution

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package execution owns the shared validation and execution lifecycle for BYDBQL candidates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine refreshes planned schemas, revalidates exact statements, executes them, and advances workflows.

func New

func New(executor tools.Executor, validator Validator) *Engine

New creates an execution engine from the shared BanyanDB dependencies.

func (*Engine) ExecuteCurrent

func (engine *Engine) ExecuteCurrent(ctx context.Context, querySession *session.QuerySession) (Outcome, error)

ExecuteCurrent executes the selected candidate, allowing a manual candidate without a compiled workflow.

func (*Engine) ExecutePlanned

func (engine *Engine) ExecutePlanned(ctx context.Context, querySession *session.QuerySession, query string) (Outcome, error)

ExecutePlanned executes only the exact current statement published by the controlled plan compiler.

type Outcome

type Outcome struct {
	Next       *session.PlannedQuery
	Phase      session.Phase
	Validation session.ValidationReport
	Result     session.ExecutionResult
	Executed   bool
}

Outcome contains the state produced by one successful validation attempt and optional execution.

type Validator

type Validator interface {
	Validate(ctx context.Context, query string, schema *session.SchemaSnapshot) (session.ValidationReport, error)
}

Validator validates a BYDBQL query against the active schema.

Jump to

Keyboard shortcuts

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