Documentation
¶
Overview ¶
Package executor executes AQL query plans against the Aha API.
Index ¶
- type Executor
- func (e *Executor) Execute(ctx context.Context, plan *planner.Plan) (*result.Result, error)
- func (e *Executor) ExecuteDelete(ctx context.Context, stmt *ast.DeleteStatement, opts MutationOptions) (*MutationResult, error)
- func (e *Executor) ExecuteInsert(ctx context.Context, stmt *ast.InsertStatement, opts MutationOptions) (*MutationResult, error)
- func (e *Executor) ExecuteUpdate(ctx context.Context, stmt *ast.UpdateStatement, opts MutationOptions) (*MutationResult, error)
- func (e *Executor) WithProgress(fn ProgressFunc) *Executor
- type MutationOptions
- type MutationResult
- type ProgressFunc
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 (*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.
func (*Executor) WithProgress ¶ added in v0.9.0
func (e *Executor) WithProgress(fn ProgressFunc) *Executor
WithProgress sets a progress callback for the executor.
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.
type ProgressFunc ¶ added in v0.9.0
ProgressFunc is called during query execution to report progress. current is the current item count, total is the estimated total (0 if unknown), and message describes the current operation.
Click to show internal directories.
Click to hide internal directories.