Ejemplo n.º 1
0
func (this *JSConverter) VisitIsNotMissing(expr *expression.IsNotMissing) (interface{}, error) {
	var buf bytes.Buffer
	buf.WriteString("typeof(")
	buf.WriteString(this.Visit(expr.Operand()))
	buf.WriteString(") != 'undefined')")
	return buf.String(), nil
}
Ejemplo n.º 2
0
func newSargNotMissing(pred *expression.IsNotMissing) *sargNotMissing {
	rv := &sargNotMissing{}
	rv.sarger = func(expr2 expression.Expression) (plan.Spans, error) {
		if SubsetOf(pred, expr2) {
			return _SELF_SPANS, nil
		}

		if pred.Operand().EquivalentTo(expr2) {
			return _FULL_SPANS, nil
		}

		return nil, nil
	}

	return rv
}