executor

package
v0.0.0-...-ad801e6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	// ExecuteRaw executes a raw query and stores results in `res`.
	ExecuteRaw(
		ctx context.Context,
		q query.ParsedRawQuery,
		seg segment.ImmutableSegment,
		retriever FieldRetriever,
		res *query.RawResults,
	) error

	// ExecuteGrouped executes a group-by query and stores results in `res`.
	ExecuteGrouped(
		ctx context.Context,
		q query.ParsedGroupedQuery,
		seg segment.ImmutableSegment,
		retriever FieldRetriever,
		res *query.GroupedResults,
	) error

	// ExecuteTimeBucket executes a time-bucket query and stores results in `res`.
	ExecuteTimeBucket(
		ctx context.Context,
		q query.ParsedTimeBucketQuery,
		seg segment.ImmutableSegment,
		retriever FieldRetriever,
		res *query.TimeBucketResults,
	) error
}

Executor executes different types of queries against the database.

func NewExecutor

func NewExecutor() Executor

NewExecutor creates a new query executor.

type FieldRetriever

type FieldRetriever interface {
	// Retrieve retrieves a list of fields.
	Retrieve(
		seg segment.ImmutableSegment,
		toRetrieve []persist.RetrieveFieldOptions,
	) ([]indexfield.DocsField, error)
}

FieldRetriever is responsible for retrieving fields from persistent storage.

Jump to

Keyboard shortcuts

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