// Or provides custom query condition.
484510
func (session *Session) Or(query interface{}, args ...interface{}) *Session {
	session.statement.Or(query, args...)
	return session
}
705056
func Or(left Expression, right Expression) Expression {
	return reparent(&OrExpression{binaryExpression{expression{}, left, right}})
}
391831
func (engine *Engine) Where(query interface{}, args ...interface{}) *Session {
	session := engine.NewSession()
	session.isAutoClose = true
	return session.Where(query, args...)
}
1249351
func Or(bys ...By) By {
	or := make(orCombinator, 0, len(bys))
	for _, by := range bys {
		or = append(or, by)
	}
	return or
}
248417
func (s *DB) Or(query interface{}, args ...interface{}) *DB {
	return s.clone().search.Or(query, args...).db
}
855921
func Or(inner ...Condition) Condition {
	if len(inner) == 1 {
		return inner[0]
	}

	return Condition{
		Type:  ConditionOr,
		Inner: inner,
	}
}
570449
func (le Le) Or(conds ...Cond) Cond {
	return Or(le, Or(conds...))
}
405064
func (query Query) OrWhere(condition ...c.Condition) Query {
	query.Condition = query.Condition.Or(c.And(condition...))
	return query
}
367834
func (p *Path) Or(path *Path) *Path {
	np := p.clone()
	np.stack = append(np.stack, orMorphism(path))
	return np
}
1227765
func (ab *AtomicBool) Or(newVal bool) bool {
	if !newVal {
		return ab.Get()
	}
	atomic.StoreInt32(&(ab.val), int32(1))
	return true
}
903027
func (q *Query) Where(stmt string, args ...interface{}) *Query {
	if q.RawSQL.Fragment != "" {
		log(logging.Warn, "Query is setup to use raw SQL")
		return q
	}
	if inRegex.MatchString(stmt) {
		var inq []string
		for i := 0; i < len(args); i++ {
			inq = append(inq, "?")
		}
		qs := fmt.Sprintf("(%s)", strings.Join(inq, ","))
		stmt = strings.Replace(stmt, "(?)", qs, 1)
	}
	q.whereClauses = append(q.whereClauses, clause{stmt, args})
	return q
}
111470
func Any(objs ...interface{}) bool {
	if len(objs) == 0 {
		return false
	}

	for _, obj := range objs {
		if !IsEmpty(obj) {
			return true
		}
	}

	return false
}
1274654
func (r *Registry) Any(kind string) mo.Entity {
	r.m.Lock()
	defer r.m.Unlock()

	for ref, val := range r.objects {
		if ref.Type == kind {
			return val.(mo.Entity)
		}
	}

	return nil
}
22138
func (gte Gte) Or(conds ...Cond) Cond {
	return Or(gte, Or(conds...))
}
1175671
func (ge Ge) Or(conds ...Cond) Cond {
	return Or(ge, Or(conds...))
}
207804
func (pr *PluralRule) GoCondition() string {
	var ors []string
	for _, and := range strings.Split(pr.Condition(), "or") {
		var ands []string
		for _, relation := range strings.Split(and, "and") {
			parts := relationRegexp.FindStringSubmatch(relation)
			if parts == nil {
				continue
			}
			lvar, lmod, op, rhs := strings.Title(parts[1]), parts[2], parts[3], strings.TrimSpace(parts[4])
			if op == "=" {
				op = "=="
			}
			lvar = "ops." + lvar
			var rhor []string
			var rany []string
			for _, rh := range strings.Split(rhs, ",") {
				if parts := strings.Split(rh, ".."); len(parts) == 2 {
					from, to := parts[0], parts[1]
					if lvar == "ops.N" {
						if lmod != "" {
							rhor = append(rhor, fmt.Sprintf("ops.NmodInRange(%s, %s, %s)", lmod, from, to))
						} else {
							rhor = append(rhor, fmt.Sprintf("ops.NinRange(%s, %s)", from, to))
						}
					} else if lmod != "" {
						rhor = append(rhor, fmt.Sprintf("intInRange(%s %% %s, %s, %s)", lvar, lmod, from, to))
					} else {
						rhor = append(rhor, fmt.Sprintf("intInRange(%s, %s, %s)", lvar, from, to))
					}
				} else {
					rany = append(rany, rh)
				}
			}

			if len(rany) > 0 {
				rh := strings.Join(rany, ",")
				if lvar == "ops.N" {
					if lmod != "" {
						rhor = append(rhor, fmt.Sprintf("ops.NmodEqualsAny(%s, %s)", lmod, rh))
					} else {
						rhor = append(rhor, fmt.Sprintf("ops.NequalsAny(%s)", rh))
					}
				} else if lmod != "" {
					rhor = append(rhor, fmt.Sprintf("intEqualsAny(%s %% %s, %s)", lvar, lmod, rh))
				} else {
					rhor = append(rhor, fmt.Sprintf("intEqualsAny(%s, %s)", lvar, rh))
				}
			}
			r := strings.Join(rhor, " || ")
			if len(rhor) > 1 {
				r = "(" + r + ")"
			}
			if op == "!=" {
				r = "!" + r
			}
			ands = append(ands, r)
		}
		ors = append(ors, strings.Join(ands, " && "))
	}
	return strings.Join(ors, " ||\n")
}
114907
func (r *Route) Any(handler http.Handler) *Route {
	r.handlers[methodAny] = handler
	return r
}