expressions

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataSource added in v0.4.0

func NewDataSource(
	src core.SourceMap,
	valVariable,
	keyVariable string,
	exp core.Expression,
) (collections.Iterable, error)

Types

type BlockExpression

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

func NewBlockExpression

func NewBlockExpression(values collections.Iterable) (*BlockExpression, error)

func (*BlockExpression) Add

func (exp *BlockExpression) Add(stmt core.Expression)

func (*BlockExpression) Exec

func (exp *BlockExpression) Exec(ctx context.Context, scope *core.Scope) (core.Value, error)

func (*BlockExpression) Iterate added in v0.5.0

func (exp *BlockExpression) Iterate(ctx context.Context, scope *core.Scope) (collections.Iterator, error)

type BodyExpression added in v0.5.0

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

func NewBodyExpression added in v0.5.0

func NewBodyExpression(size int) *BodyExpression

func (*BodyExpression) Add added in v0.5.0

func (b *BodyExpression) Add(exp core.Expression) error

func (*BodyExpression) Exec added in v0.5.0

func (b *BodyExpression) Exec(ctx context.Context, scope *core.Scope) (core.Value, error)

type ConditionExpression

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

func NewConditionExpression

func NewConditionExpression(
	src core.SourceMap,
	test core.Expression,
	consequent core.Expression,
	alternate core.Expression,
) (*ConditionExpression, error)

func (*ConditionExpression) Exec

func (e *ConditionExpression) Exec(ctx context.Context, scope *core.Scope) (core.Value, error)

type DataSource added in v0.4.0

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

func (*DataSource) Iterate added in v0.4.0

func (ds *DataSource) Iterate(ctx context.Context, scope *core.Scope) (collections.Iterator, error)

type ForExpression

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

func NewForExpression

func NewForExpression(
	src core.SourceMap,
	dataSource collections.Iterable,
	predicate core.Expression,
	distinct,
	spread bool,
) (*ForExpression, error)

func (*ForExpression) AddCollect added in v0.4.0

func (e *ForExpression) AddCollect(src core.SourceMap, params *clauses.Collect) error

func (*ForExpression) AddFilter

func (e *ForExpression) AddFilter(src core.SourceMap, exp core.Expression) error

func (*ForExpression) AddLimit

func (e *ForExpression) AddLimit(src core.SourceMap, size, count core.Expression) error

func (*ForExpression) AddSort

func (e *ForExpression) AddSort(src core.SourceMap, sorters ...*clauses.SorterExpression) error

func (*ForExpression) AddStatement added in v0.5.0

func (e *ForExpression) AddStatement(stmt core.Expression) error

func (*ForExpression) Exec

func (e *ForExpression) Exec(ctx context.Context, scope *core.Scope) (core.Value, error)

type FunctionCallExpression

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

func NewFunctionCallExpression

func NewFunctionCallExpression(
	src core.SourceMap,
	fun core.Function,
	args ...core.Expression,
) (*FunctionCallExpression, error)

func (*FunctionCallExpression) Arguments added in v0.4.0

func (e *FunctionCallExpression) Arguments() []core.Expression

func (*FunctionCallExpression) Exec

func (e *FunctionCallExpression) Exec(ctx context.Context, scope *core.Scope) (core.Value, error)

func (*FunctionCallExpression) Function added in v0.4.0

func (e *FunctionCallExpression) Function() core.Function

type MemberExpression

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

func NewMemberExpression

func NewMemberExpression(src core.SourceMap, variableName string, path []core.Expression) (*MemberExpression, error)

func (*MemberExpression) Exec

func (e *MemberExpression) Exec(ctx context.Context, scope *core.Scope) (core.Value, error)

type ParameterExpression

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

func NewParameterExpression

func NewParameterExpression(src core.SourceMap, name string) (*ParameterExpression, error)

func (*ParameterExpression) Exec

type ReturnExpression

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

func NewReturnExpression

func NewReturnExpression(
	src core.SourceMap,
	predicate core.Expression,
) (*ReturnExpression, error)

func (*ReturnExpression) Exec

func (e *ReturnExpression) Exec(ctx context.Context, scope *core.Scope) (core.Value, error)

type VariableDeclarationExpression

type VariableDeclarationExpression struct {
	*VariableExpression
	// contains filtered or unexported fields
}

func NewVariableDeclarationExpression

func NewVariableDeclarationExpression(src core.SourceMap, name string, init core.Expression) (*VariableDeclarationExpression, error)

func (*VariableDeclarationExpression) Exec

type VariableExpression

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

func NewVariableExpression

func NewVariableExpression(src core.SourceMap, name string) (*VariableExpression, error)

func (*VariableExpression) Exec

func (e *VariableExpression) Exec(_ context.Context, scope *core.Scope) (core.Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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