func (w whereFunc) And(right Where) Where {
	if w == nil {
		return right
	}
	return And(w, right)
}
And applies an and condition between two where conditions
package dialect
import (
	"github.com/posener/orm"
	"github.com/posener/orm/dialect/builder"
)
type Where interface {
	Build(table string, b *builder.Builder)
	Or(Where) Where
	And(Where) Where
}
func NewWhere(op orm.Op, variable string, value interface{}) Where {
	return whereFunc(func(table string, b *builder.Builder) {
		b.QuoteFullName(table, variable)
		b.Append(string(op))
		b.Var(value)
	})
}
func NewWhereIn(variable string, values ...interface{}) Where {
	return whereFunc(func(table string, b *builder.Builder) {
		b.QuoteFullName(table, variable)
		b.Append("IN")
		b.Open()
		for i, value := range values {
			b.Var(value)
			if i != len(values)-1 {
				b.Comma()
			}
		}
		b.Close()
	})
}
func NewWhereBetween(variable string, low, high interface{}) Where {
	return whereFunc(func(table string, b *builder.Builder) {
		b.QuoteFullName(table, variable)
		b.Append("BETWEEN")
		b.Var(low)
		b.Append("AND")
		b.Var(high)
	})
}
func Or(w ...Where) Where {
	return concat("OR", w...)
}
func And(w ...Where) Where {
	return concat("AND", w...)
}
type whereFunc func(table string, b *builder.Builder)
func (w whereFunc) Build(table string, b *builder.Builder) {
	w(table, b)
}
func (w whereFunc) Or(right Where) Where {
	if w == nil {
		return right
	}
	return Or(w, right)
}