func LessThan(expr1, expr2 expression.Expression) bool { value1 := expr1.Value() value2 := expr2.Value() return value1 != nil && value2 != nil && value1.Collate(value2) < 0 }
/* The function NewExecute returns a pointer to the Execute struct with the input argument expressions value as a field. */ func NewExecute(prepared expression.Expression) *Execute { rv := &Execute{ prepared: prepared.Value(), } rv.stmt = rv return rv }
func SargableFor(expr1, expr2 expression.Expression) bool { if expr2.Value() != nil { return false } s := newSargable(expr1) result, _ := expr2.Accept(s) return result.(bool) }
func SubsetOf(expr1, expr2 expression.Expression) bool { v2 := expr2.Value() if v2 != nil { return v2.Truth() } s := newSubset(expr1) result, _ := expr2.Accept(s) return result.(bool) }
func SargFor(expr1, expr2 expression.Expression) Spans { if expr2.Value() != nil { return nil } s := newSarg(expr1) result, _ := expr2.Accept(s) if result != nil { return result.(Spans) } return nil }