Documentation
¶
Index ¶
- func AddConversion(m *Machine, conversion func(m *Machine) error, preLast bool)
- func AddFloatToTimestamp(m *Machine) error
- func AddFloats(m *Machine) error
- func AddIntToTimestamp(m *Machine) error
- func AddInts(m *Machine) error
- func AddPushAttribute(m *Machine, tableIx int, ix int)
- func AddPushAttribute2(m *Machine, tableIx int, ix int)
- func AddPushConstant(m *Machine, val Value)
- func AddPushPlaceHolder(m *Machine, ix int)
- func AddSecondsToTime(m *Machine) error
- func AddStrings(m *Machine) error
- func AndBooleans(m *Machine) error
- func BoolEqual(m *Machine) error
- func BoolGreaterThan(m *Machine) error
- func BoolGreaterThanOrEqual(m *Machine) error
- func BoolLessThan(m *Machine) error
- func BoolLessThanOrEqual(m *Machine) error
- func BoolNotEqual(m *Machine) error
- func BooleanToFloat(m *Machine) error
- func BooleanToInt(m *Machine) error
- func BooleanToString(m *Machine) error
- func CompareBool(m *Machine) error
- func CompareFloat64(m *Machine) error
- func CompareInt64(m *Machine) error
- func CompareString(m *Machine) error
- func CompareTimestamp(m *Machine) error
- func ConvertFloat64ToTime(m *Machine) error
- func ConvertInt64ToTime(m *Machine) error
- func ConvertStringToTime(m *Machine) error
- func ConvertTimeToFloat64(m *Machine) error
- func ConvertTimeToInt64(m *Machine) error
- func ConvertTimeToString(m *Machine) error
- func DivideFloats(m *Machine) error
- func DivideInts(m *Machine) error
- func Float64Equal(m *Machine) error
- func Float64GreaterThan(m *Machine) error
- func Float64GreaterThanOrEqual(m *Machine) error
- func Float64LessThan(m *Machine) error
- func Float64LessThanOrEqual(m *Machine) error
- func Float64NotEqual(m *Machine) error
- func FloatToBoolean(m *Machine) error
- func FloatToInt(m *Machine) error
- func FloatToString(m *Machine) error
- func FloatToTimestamp(m *Machine) error
- func IntEqual(m *Machine) error
- func IntGreaterThan(m *Machine) error
- func IntGreaterThanOrEqual(m *Machine) error
- func IntLessThan(m *Machine) error
- func IntLessThanOrEqual(m *Machine) error
- func IntNotEqual(m *Machine) error
- func IntToBoolean(m *Machine) error
- func IntToFloat(m *Machine) error
- func IntToString(m *Machine) error
- func IntToTimestamp(m *Machine) error
- func InvertTopBool(m *Machine) error
- func IsNotNullCommand(m *Machine) error
- func IsNullCommand(m *Machine) error
- func LikeStrings(m *Machine) error
- func ModuloFloats(m *Machine) error
- func ModuloInts(m *Machine) error
- func MultiplyFloats(m *Machine) error
- func MultiplyInts(m *Machine) error
- func OrBooleans(m *Machine) error
- func ReturnIfNotEqualZero(m *Machine) error
- func ReturnInverseIfNotEqualZero(m *Machine) error
- func StringEqual(m *Machine) error
- func StringGreaterThan(m *Machine) error
- func StringGreaterThanOrEqual(m *Machine) error
- func StringLessThan(m *Machine) error
- func StringLessThanOrEqual(m *Machine) error
- func StringNotEqual(m *Machine) error
- func StringToBoolean(m *Machine) error
- func StringToFloat(m *Machine) error
- func StringToInt(m *Machine) error
- func StringToTimestamp(m *Machine) error
- func SubtractFloatFromTimestamp(m *Machine) error
- func SubtractFloats(m *Machine) error
- func SubtractIntFromTimestamp(m *Machine) error
- func SubtractInts(m *Machine) error
- func SubtractTimestamps(m *Machine) error
- func TimeEqual(m *Machine) error
- func TimeGreaterThan(m *Machine) error
- func TimeGreaterThanOrEqual(m *Machine) error
- func TimeLessThan(m *Machine) error
- func TimeLessThanOrEqual(m *Machine) error
- func TimeNotEqual(m *Machine) error
- func TimestampToFloat(m *Machine) error
- func TimestampToInteger(m *Machine) error
- func TimestampToString(m *Machine) error
- type Command
- type Machine
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddConversion ¶
func AddFloatToTimestamp ¶
AddFloatToTimestamp adds a float (seconds) to a timestamp
func AddIntToTimestamp ¶
AddIntToTimestamp adds an integer (seconds) to a timestamp
func AddPushAttribute ¶
func AddPushAttribute2 ¶
func AddPushConstant ¶
func AddPushConstant(m *Machine, val Value)
func AddPushPlaceHolder ¶
func AddSecondsToTime ¶
func AndBooleans ¶
AndBooleans performs logical AND on two booleans
func BoolGreaterThan ¶
func BoolGreaterThanOrEqual ¶
func BoolLessThanOrEqual ¶
func BoolNotEqual ¶
func BooleanToFloat ¶
BooleanToFloat converts the top boolean to float64
func BooleanToInt ¶
BooleanToInt converts the top boolean to int
func BooleanToString ¶
BooleanToString converts the top boolean to string
func CompareBool ¶
func CompareFloat64 ¶
func CompareInt64 ¶
func CompareString ¶
func CompareTimestamp ¶
func ConvertFloat64ToTime ¶
ConvertFloat64ToTime replaces the first element of the stack (expected to be *float64) with *time.Time
func ConvertInt64ToTime ¶
ConvertInt64ToTime replaces the first element of the stack (expected to be *int64) with *time.Time
func ConvertStringToTime ¶
func ConvertTimeToFloat64 ¶
func ConvertTimeToInt64 ¶
func ConvertTimeToString ¶
func Float64Equal ¶
func Float64GreaterThan ¶
func Float64LessThanOrEqual ¶
func Float64NotEqual ¶
func FloatToBoolean ¶
FloatToBoolean converts the top float64 to boolean
func FloatToString ¶
FloatToString converts the top float64 to string
func FloatToTimestamp ¶
FloatToTimestamp converts the top float64 (Unix timestamp) to time.Time
func IntGreaterThan ¶
func IntGreaterThanOrEqual ¶
func IntLessThanOrEqual ¶
func IntNotEqual ¶
func IntToBoolean ¶
IntToBoolean converts the top int to boolean
func IntToTimestamp ¶
IntToTimestamp converts the top int (Unix timestamp) to time.Time
func InvertTopBool ¶
func IsNotNullCommand ¶
func IsNullCommand ¶
func LikeStrings ¶
LikeStrings performs a simple pattern matching (like SQL LIKE)
func ModuloFloats ¶
ModuloFloats performs modulo operation on two floats
func ModuloInts ¶
ModuloInts performs modulo operation on two integers
func ReturnIfNotEqualZero ¶
func StringEqual ¶
func StringGreaterThan ¶
func StringLessThanOrEqual ¶
func StringNotEqual ¶
func StringToBoolean ¶
StringToBoolean converts the top string to a boolean
func StringToFloat ¶
StringToFloat converts the top string to a float64
func StringToInt ¶
StringToInt converts the top string to an integer
func StringToTimestamp ¶
StringToTimestamp converts the top string to a time.Time
func SubtractFloatFromTimestamp ¶
SubtractFloatFromTimestamp Subtracts a float (seconds) From a timestamp
func SubtractIntFromTimestamp ¶
SubtractIntToTimestamp Subtracts an integer (seconds) to a timestamp
func SubtractTimestamps ¶
SubtractTimestamps subtracts two timestamps
func TimeGreaterThan ¶
func TimeGreaterThanOrEqual ¶
func TimeLessThanOrEqual ¶
func TimeNotEqual ¶
func TimestampToFloat ¶
TimestampToFloat converts the top time.Time to a float64 (Unix timestamp with fractional seconds)
func TimestampToInteger ¶
TimestampToInteger converts the top time.Time to an integer (Unix timestamp)
func TimestampToString ¶
TimestampToString converts the top time.Time to a string
Types ¶
type Machine ¶
type Machine struct {
// contains filtered or unexported fields
}
Machine represents our command evaluator
func (*Machine) AddCommand ¶
func (*Machine) AddCommandBeforeLast ¶
func (*Machine) ReturnPlaceHolder ¶
type Stack ¶
type Stack interface { // Push adds an element to the top of the stack. Push(x interface{}) // Pop removes and returns the top element of the stack. // It returns false as the second return value if the stack is empty. Pop() (interface{}, bool) // Peek returns the top element of the stack without removing it. // It returns false as the second return value if the stack is empty. Peek() (interface{}, bool) // IsEmpty returns true if the stack is empty, false otherwise. IsEmpty() bool // Size returns the number of elements in the stack. Size() int // Clear removes all elements from the stack. Clear() }
Stack is an interface that defines the standard operations of a stack data structure.