// And wraps conditions using and.
515909
func (c Condition) And(condition ...Condition) Condition {
	if c.None() && len(condition) == 1 {
		return condition[0]
	} else if c.Type == ConditionAnd {
		c.Inner = append(c.Inner, condition...)
		return c
	}

	inner := append([]Condition{c}, condition...)
	return And(inner...)
}
684362
func (qb *Builder) AndEquals(tag string, operand interface{}) *Builder {
	qb.condition.Tag = tag
	qb.condition.Op = equalString
	qb.condition.Operand = operandString(operand)
	return NewBuilder(qb.and(stringIterator(qb.conditionString())))
}
369311
func (e BoolExprBuilder) And(expr BoolExpr) BoolExprBuilder {
	var conditions []BoolExpr

	if andExpr, ok := e.BoolExpr.(*AndExpr); ok {
		conditions = append(conditions, andExpr.Exprs...)
	} else {
		conditions = append(conditions, e.BoolExpr)
	}

	unwrapped := unwrapBoolExpr(expr)
	if andExpr, ok := unwrapped.(*AndExpr); ok {
		conditions = append(conditions, andExpr.Exprs...)
	} else {
		conditions = append(conditions, unwrapped)
	}

	return BoolExprBuilder{
		&AndExpr{
			Op:    astAndExpr,
			Exprs: conditions,
		}}
}
550298
func (t *precompilationTypeChecker) AcceptAnd(v tree.And) {
	res := either(
		checkPrecompilationRules(v.Left),
		checkPrecompilationRules(v.Right))
	if res != nil {
		t.result = res
	}
}
112954
func (c *checker) CheckAndUpdate(p *predicate.Predicate) bool {
	if c.max && c.c <= 0 {
		return false
	}
	if p.Type() == predicate.Immutable {
		c.c--
		return true
	}

	if t, err := p.TimeAnchor(); err == nil {
		if c.ota != nil && !c.ota.Equal(*t) {
			return false
		}
		if c.o.LowerAnchor != nil && t.Before(*c.o.LowerAnchor) {
			return false
		}
		if c.o.UpperAnchor != nil && t.After(*c.o.UpperAnchor) {
			return false
		}
	}
	c.c--
	return true
}
1142464
func (c *Call) DoAndReturn(f interface{}) *Call {
	// TODO: Check arity and types here, rather than dying badly elsewhere.
	v := reflect.ValueOf(f)

	c.addAction(func(args []interface{}) []interface{} {
		vargs := make([]reflect.Value, len(args))
		ft := v.Type()
		for i := 0; i < len(args); i++ {
			if args[i] != nil {
				vargs[i] = reflect.ValueOf(args[i])
			} else {
				// Use the zero value for the arg.
				vargs[i] = reflect.Zero(ft.In(i))
			}
		}
		vrets := v.Call(vargs)
		rets := make([]interface{}, len(vrets))
		for i, ret := range vrets {
			rets[i] = ret.Interface()
		}
		return rets
	})
	return c
}
153756
func (qb *TiDBQueryBuilder) And(cond string) QueryBuilder {
	qb.Tokens = append(qb.Tokens, "AND", cond)
	return qb
}
392114
func (a *Assertions) Condition(comp Comparison, msgAndArgs ...interface{}) bool {
	return Condition(a.t, comp, msgAndArgs...)
}
61953
func (le Le) And(conds ...Cond) Cond {
	return And(le, And(conds...))
}
1212426
func (rc *runContainer16) And(b *Bitmap) *Bitmap {
	out := NewBitmap()
	for _, p := range rc.iv {
		plast := p.last()
		for i := p.start; i <= plast; i++ {
			if b.Contains(uint32(i)) {
				out.Add(uint32(i))
			}
		}
	}
	return out
}
848399
func (rf Range) AND(f Range) Range {
	return Range(func(v Version) bool {
		return rf(v) && f(v)
	})
}
973086
func (p *Path) And(path *Path) *Path {
	np := p.clone()
	np.stack = append(np.stack, andMorphism(path))
	return np
}
484246
func (like Like) And(conds ...Cond) Cond {
	return And(like, And(conds...))
}
674941
func NewOperand(o ...interface{}) Operand {
	if len(o) == 1 {
		if c, ok := o[0].(I); ok {
			return Operand{Column: c}
		}
	}

	return Operand{Values: o}
}
590272
func (neq Neq) And(conds ...Cond) Cond {
	return And(neq, And(conds...))
}
1050518
func and(groups []Group) []Group {
	op := &andOperation{stack: &stack{}}
	op.and(groups, 0)
	return op.result
}
561909
func (q *Query) or(r *Query) *Query {
	return q.andOr(r, QOr)
}