Documentation ¶
Index ¶
- Constants
- Variables
- func And(left, right func(Context) (bool, error)) func(Context) (bool, error)
- func Between(left, from, to func(Context) (Value, error)) func(Context) (bool, error)
- func CallFunc(call func(Context, []Value) (Value, error), ...) func(ctx Context) (Value, error)
- func ConvertToBool(readValue func(Context) (Value, error)) func(Context) (Value, error)
- func ConvertToDatetime(readValue func(Context) (Value, error)) func(Context) (Value, error)
- func ConvertToInt(readValue func(Context) (Value, error)) func(Context) (Value, error)
- func ConvertToUint(readValue func(Context) (Value, error)) func(Context) (Value, error)
- func DatetimeToInt(t time.Time) int64
- func DivFunc(left, right func(Context) (Value, error)) func(Context) (Value, error)
- func DurationToInt(t time.Duration) int64
- func Equal(left, right func(Context) (Value, error)) func(Context) (bool, error)
- func GreaterEqual(left, right func(Context) (Value, error)) func(Context) (bool, error)
- func GreaterThan(left, right func(Context) (Value, error)) func(Context) (bool, error)
- func In(left func(Context) (Value, error), right func(Context) ([]Value, error)) func(Context) (bool, error)
- func IntDivFunc(left, right func(Context) (Value, error)) func(Context) (Value, error)
- func IntToDatetime(t int64) time.Time
- func IntToDuration(t int64) time.Duration
- func IntToInterval(t int64) time.Duration
- func IntervalToInt(t time.Duration) int64
- func IsFalse(value func(Context) (Value, error)) func(Context) (bool, error)
- func IsNotFalse(value func(Context) (Value, error)) func(Context) (bool, error)
- func IsNotNull(value func(Context) (Value, error)) func(Context) (bool, error)
- func IsNotTrue(value func(Context) (Value, error)) func(Context) (bool, error)
- func IsNull(value func(Context) (Value, error)) func(Context) (bool, error)
- func IsTrue(value func(Context) (Value, error)) func(Context) (bool, error)
- func LessEqual(left, right func(Context) (Value, error)) func(Context) (bool, error)
- func LessThan(left, right func(Context) (Value, error)) func(Context) (bool, error)
- func Like(left, right func(Context) (Value, error)) func(Context) (bool, error)
- func MinusFunc(left, right func(Context) (Value, error)) func(Context) (Value, error)
- func ModFunc(left, right func(Context) (Value, error)) func(Context) (Value, error)
- func MultFunc(left, right func(Context) (Value, error)) func(Context) (Value, error)
- func NewArithmeticError(op, left, right string) error
- func NewTypeError(r interface{}, actual, expected string) error
- func NewTypeMismatch(actual, expected string) error
- func Not(f func(Context) (bool, error)) func(Context) (bool, error)
- func NotBetween(left, from, to func(Context) (Value, error)) func(Context) (bool, error)
- func NotEqual(left, right func(Context) (Value, error)) func(Context) (bool, error)
- func NotIn(left func(Context) (Value, error), right func(Context) ([]Value, error)) func(Context) (bool, error)
- func NotLike(left, right func(Context) (Value, error)) func(Context) (bool, error)
- func NotRegexp(left, right func(Context) (Value, error)) func(Context) (bool, error)
- func Or(left, right func(Context) (bool, error)) func(Context) (bool, error)
- func PlusFunc(left, right func(Context) (Value, error)) func(Context) (Value, error)
- func Regexp(left, right func(Context) (Value, error)) func(Context) (bool, error)
- func ToDatetime(s string) (time.Time, error)
- func ToSwitch(condList []func(Context) (bool, error), ...) func(Context) (Value, error)
- func ToSwitchWithValue(readValue func(Context) (Value, error), ...) func(Context) (Value, error)
- func UminusFunc(read func(Context) (Value, error)) func(Context) (Value, error)
- type Aggregator
- type CompareOption
- type Context
- type GetValueFunc
- type GetValuer
- type TypeError
- type Value
- func AnyToValue(value interface{}) Value
- func BoolToValue(value bool) Value
- func DatetimeToValue(value time.Time) Value
- func Div(leftValue, rightValue Value) (Value, error)
- func DivInt(leftValue Value, rightValue int64) (Value, error)
- func DivUint(leftValue Value, rightValue uint64) (Value, error)
- func DurationToValue(value time.Duration) Value
- func FloatToValue(value float64) Value
- func IntDiv(leftValue, rightValue Value) (Value, error)
- func IntToValue(value int64) Value
- func IntervalToValue(value time.Duration) Value
- func Minus(leftValue, rightValue Value) (Value, error)
- func Mod(leftValue, rightValue Value) (Value, error)
- func Mult(leftValue, rightValue Value) (Value, error)
- func MustToValue(value interface{}) Value
- func Null() Value
- func Plus(leftValue, rightValue Value) (Value, error)
- func ReadValueFromString(s string) Value
- func Round(ctx Context, values []Value) (Value, error)
- func StringAsNumber(s string) (Value, error)
- func StringToValue(value string) Value
- func ToDatetimeValue(s string) (Value, error)
- func ToValue(value interface{}) (Value, error)
- func UintToValue(value uint64) Value
- func Uminus(value Value) (Value, error)
- type ValueType
Constants ¶
View Source
const ( ValueNull = luluo.ValueNull ValueBool = luluo.ValueBool ValueString = luluo.ValueString ValueInt64 = luluo.ValueInt64 ValueUint64 = luluo.ValueUint64 ValueFloat64 = luluo.ValueFloat64 ValueDatetime = luluo.ValueDatetime ValueInterval = luluo.ValueInterval ValueAny = luluo.ValueAny )
Variables ¶
View Source
var AggFuncs = map[string]func() Aggregator{ "count": func() Aggregator { return &countAgg{} }, "sum": func() Aggregator { return &sumAgg{ sum: IntToValue(0), } }, "avg": func() Aggregator { return &avgAgg{ sum: IntToValue(0), } }, }
View Source
var ErrNotFound = errors.ErrNotFound
View Source
var ErrUnknownValueType = luluo.ErrUnknownValueType
Functions ¶
func ConvertToBool ¶
func ConvertToDatetime ¶
func ConvertToInt ¶
func ConvertToUint ¶
func DatetimeToInt ¶
func DurationToInt ¶
func GreaterEqual ¶
func GreaterThan ¶
func IntDivFunc ¶
func IntToDatetime ¶
func IntToDuration ¶
func IntToInterval ¶
func IntervalToInt ¶
func NewArithmeticError ¶
func NewTypeError ¶
func NewTypeMismatch ¶
func NotBetween ¶
func ToSwitchWithValue ¶
Types ¶
type CompareOption ¶
type CompareOption = luluo.CompareOption
func EmptyCompareOption ¶
func EmptyCompareOption() CompareOption
type GetValueFunc ¶
type Value ¶
func AnyToValue ¶
func AnyToValue(value interface{}) Value
func BoolToValue ¶
func DatetimeToValue ¶
func DurationToValue ¶
func FloatToValue ¶
func IntToValue ¶
func IntervalToValue ¶
func MustToValue ¶
func MustToValue(value interface{}) Value
func ReadValueFromString ¶
func StringAsNumber ¶
func StringToValue ¶
func ToDatetimeValue ¶
func UintToValue ¶
Click to show internal directories.
Click to hide internal directories.