expressions

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockExpression

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

func NewBlockExpression

func NewBlockExpression(size int) *BlockExpression

func NewBlockExpressionWith

func NewBlockExpressionWith(elements ...core.Expression) *BlockExpression

func (*BlockExpression) Add

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

func (*BlockExpression) Exec

func (b *BlockExpression) 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 ForExpression

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

func NewForExpression

func NewForExpression(
	src core.SourceMap,
	valVar string,
	keyVar string,
	dataSource collections.IterableExpression,
	predicate core.Expression,
	spread bool,
) (*ForExpression, error)

func (*ForExpression) AddDistinct

func (e *ForExpression) AddDistinct(src core.SourceMap)

func (*ForExpression) AddFilter

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

func (*ForExpression) AddLimit

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

func (*ForExpression) AddSort

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

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) Exec

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

func (*FunctionCallExpression) Iterate

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)

func (*MemberExpression) Iterate

func (e *MemberExpression) Iterate(ctx context.Context, scope *core.Scope) (collections.Iterator, 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

func (*ParameterExpression) Iterate

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)

func (*VariableExpression) Iterate

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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