executor

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecuteQueryError added in v0.1.0

func NewExecuteQueryError(err error) error

func NewValidateQueryError added in v0.1.0

func NewValidateQueryError(err error) error

Types

type ExecuteQueryError added in v0.1.0

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

func (ExecuteQueryError) Error added in v0.1.0

func (e ExecuteQueryError) Error() string

func (ExecuteQueryError) Is added in v0.1.0

func (e ExecuteQueryError) Is(err error) bool

func (ExecuteQueryError) Unwrap added in v0.1.0

func (e ExecuteQueryError) Unwrap() error

type Iterator

type Iterator[R record.Record] interface {
	Next(ctx context.Context) bool
	Item() R
	Size() int
	Err() error
	Seq(ctx context.Context) iter.Seq[R]
}

type QueryExecutor

type QueryExecutor[R record.Record] interface {
	FetchTotal(ctx context.Context, q query.Query[R]) (int, error)
	FetchAll(ctx context.Context, q query.Query[R]) (Iterator[R], error)
	FetchAllAndTotal(ctx context.Context, q query.Query[R]) (Iterator[R], int, error)
}

func CreateQueryExecutor

func CreateQueryExecutor[R record.Record](selector Selector[R]) QueryExecutor[R]

type Selector added in v0.1.0

type Selector[R record.Record] interface {
	PreselectForExecutor(conditions where.Conditions[R]) ([]R, error)
}

type ValidateQueryError added in v0.1.0

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

func (ValidateQueryError) Error added in v0.1.0

func (e ValidateQueryError) Error() string

func (ValidateQueryError) Is added in v0.1.0

func (e ValidateQueryError) Is(err error) bool

func (ValidateQueryError) Unwrap added in v0.1.0

func (e ValidateQueryError) Unwrap() error

Jump to

Keyboard shortcuts

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