executor

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package executor executes AQL query plans against the Aha API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

Executor executes query plans against the Aha API.

func New

func New(client *aha.Client) *Executor

New creates a new executor with the given Aha client.

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context, plan *planner.Plan) (*result.Result, error)

Execute executes a query plan and returns the results.

func (*Executor) ExecuteDelete

func (e *Executor) ExecuteDelete(ctx context.Context, stmt *ast.DeleteStatement, opts MutationOptions) (*MutationResult, error)

ExecuteDelete executes a DELETE statement.

func (*Executor) ExecuteInsert

func (e *Executor) ExecuteInsert(ctx context.Context, stmt *ast.InsertStatement, opts MutationOptions) (*MutationResult, error)

ExecuteInsert executes an INSERT statement.

func (*Executor) ExecuteUpdate

func (e *Executor) ExecuteUpdate(ctx context.Context, stmt *ast.UpdateStatement, opts MutationOptions) (*MutationResult, error)

ExecuteUpdate executes an UPDATE statement.

type MutationOptions

type MutationOptions struct {
	// DryRun if true, shows what would happen without making changes.
	DryRun bool

	// ProductID is required for most mutations.
	ProductID string

	// ReleaseID is required for creating features.
	ReleaseID string
}

MutationOptions configures mutation execution.

type MutationResult

type MutationResult struct {
	// Operation is the type of mutation (INSERT, UPDATE, DELETE).
	Operation string

	// Entity is the entity type affected.
	Entity ast.EntityType

	// AffectedCount is the number of records affected.
	AffectedCount int

	// Records contains the affected records (for INSERT/UPDATE).
	Records []result.Record

	// IDs contains the IDs of affected records.
	IDs []string

	// DryRun indicates if this was a dry run.
	DryRun bool

	// Errors contains any errors encountered during the operation.
	Errors []error
}

MutationResult represents the result of a mutation operation.

Jump to

Keyboard shortcuts

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