Documentation ¶
Index ¶
- func NewBinaryExpression(name string, leftExpression, rightExpression *opt.LogicalExpression) *opt.LogicalExpression
- func NewBitwiseNotUnaryExpression(name string, expression *opt.LogicalExpression) *opt.LogicalExpression
- func NewBooleanValueExpression(value bool) *opt.LogicalExpression
- func NewDateTimeExpression(value string) *opt.LogicalExpression
- func NewEmptyExpression() *opt.LogicalExpression
- func NewFloatExpression(value string) *opt.LogicalExpression
- func NewFunctionExpression(id *opt.LogicalExpression, args []*opt.LogicalExpression) *opt.LogicalExpression
- func NewIdentifierExpression(name string) *opt.LogicalExpression
- func NewIntegerValueExpression(value string) *opt.LogicalExpression
- func NewNegateUnaryExpression(name string, expression *opt.LogicalExpression) *opt.LogicalExpression
- func NewNotUnaryExpression(name string, expression *opt.LogicalExpression) *opt.LogicalExpression
- func NewPiExpression() *opt.LogicalExpression
- func NewStringValueExpression(value string) *opt.LogicalExpression
- func NewTernaryExpression(left, mid, right *opt.LogicalExpression) *opt.LogicalExpression
- func NewVarIdentifierExpression(name string) *opt.LogicalExpression
- type BinaryExpression
- type BitwiseNotUnaryExpression
- type BooleanValueExpression
- type DateTimeExpression
- type EmptyExpression
- type FloatExpression
- type FunctionExpression
- type IdentifierExpression
- type IntegerValueExpression
- type NegateUnaryExpression
- type NotUnaryExpression
- type PiExpression
- type StringValueExpression
- type TernaryExpression
- type UnaryExpression
- type VarIdentifierExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBinaryExpression ¶
func NewBinaryExpression(name string, leftExpression, rightExpression *opt.LogicalExpression) *opt.LogicalExpression
func NewBitwiseNotUnaryExpression ¶
func NewBitwiseNotUnaryExpression(name string, expression *opt.LogicalExpression) *opt.LogicalExpression
func NewBooleanValueExpression ¶
func NewBooleanValueExpression(value bool) *opt.LogicalExpression
func NewDateTimeExpression ¶
func NewDateTimeExpression(value string) *opt.LogicalExpression
func NewEmptyExpression ¶
func NewEmptyExpression() *opt.LogicalExpression
func NewFloatExpression ¶
func NewFloatExpression(value string) *opt.LogicalExpression
func NewFunctionExpression ¶
func NewFunctionExpression(id *opt.LogicalExpression, args []*opt.LogicalExpression) *opt.LogicalExpression
func NewIdentifierExpression ¶
func NewIdentifierExpression(name string) *opt.LogicalExpression
func NewIntegerValueExpression ¶
func NewIntegerValueExpression(value string) *opt.LogicalExpression
func NewNegateUnaryExpression ¶
func NewNegateUnaryExpression(name string, expression *opt.LogicalExpression) *opt.LogicalExpression
func NewNotUnaryExpression ¶
func NewNotUnaryExpression(name string, expression *opt.LogicalExpression) *opt.LogicalExpression
func NewPiExpression ¶
func NewPiExpression() *opt.LogicalExpression
func NewStringValueExpression ¶
func NewStringValueExpression(value string) *opt.LogicalExpression
func NewTernaryExpression ¶
func NewTernaryExpression(left, mid, right *opt.LogicalExpression) *opt.LogicalExpression
func NewVarIdentifierExpression ¶
func NewVarIdentifierExpression(name string) *opt.LogicalExpression
NewVarIdentifierExpression create new custom parameter which output like '[Parameter]'
Types ¶
type BinaryExpression ¶
type BinaryExpression struct { Name string LeftExpression *opt.LogicalExpression RightExpression *opt.LogicalExpression }
func (*BinaryExpression) Evaluate ¶
func (expression *BinaryExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type BitwiseNotUnaryExpression ¶
type BitwiseNotUnaryExpression struct {
UnaryExpression
}
func (*BitwiseNotUnaryExpression) Evaluate ¶
func (expression *BitwiseNotUnaryExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type BooleanValueExpression ¶
type BooleanValueExpression struct {
Value bool
}
func (*BooleanValueExpression) Evaluate ¶
func (expression *BooleanValueExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type DateTimeExpression ¶
todo:时间表达式如何处理?
func (*DateTimeExpression) Evaluate ¶
func (expression *DateTimeExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type EmptyExpression ¶
type EmptyExpression struct { }
func (*EmptyExpression) Evaluate ¶
func (expression *EmptyExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type FloatExpression ¶
type FloatExpression struct {
Value float64
}
func (*FloatExpression) Evaluate ¶
func (expression *FloatExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type FunctionExpression ¶
type FunctionExpression struct { Identifier *opt.LogicalExpression Arguments []*opt.LogicalExpression }
func (*FunctionExpression) Evaluate ¶
func (expression *FunctionExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type IdentifierExpression ¶
type IdentifierExpression struct {
Name string
}
func (*IdentifierExpression) Evaluate ¶
func (expression *IdentifierExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type IntegerValueExpression ¶
type IntegerValueExpression struct {
Value int64
}
func (*IntegerValueExpression) Evaluate ¶
func (expression *IntegerValueExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type NegateUnaryExpression ¶
type NegateUnaryExpression struct {
UnaryExpression
}
func (*NegateUnaryExpression) Evaluate ¶
func (expression *NegateUnaryExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type NotUnaryExpression ¶
type NotUnaryExpression struct {
UnaryExpression
}
func (*NotUnaryExpression) Evaluate ¶
func (expression *NotUnaryExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type PiExpression ¶
type PiExpression struct { }
func (*PiExpression) Evaluate ¶
func (*PiExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type StringValueExpression ¶
type StringValueExpression struct {
Value string
}
func (*StringValueExpression) Evaluate ¶
func (expression *StringValueExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
func (*StringValueExpression) ToString ¶
func (*StringValueExpression) ToString() string
type TernaryExpression ¶
type TernaryExpression struct { Left *opt.LogicalExpression Middle *opt.LogicalExpression Right *opt.LogicalExpression }
func (*TernaryExpression) Evaluate ¶
func (expression *TernaryExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
type UnaryExpression ¶
type UnaryExpression struct { Name string Expression *opt.LogicalExpression }
type VarIdentifierExpression ¶
type VarIdentifierExpression struct {
Name string
}
func (*VarIdentifierExpression) Evaluate ¶
func (expression *VarIdentifierExpression) Evaluate(context *opt.FormulaContext) (*opt.Argument, error)
Click to show internal directories.
Click to hide internal directories.