// Using sets a USING join condition for the expression, replacing any
// existing join condition. The columns must exist in both the left
// and right sides of the join expression.
346791
func (b *JoinBuilder) Using(cols ...interface{}) *JoinBuilder {
	var vals Columns
	for _, c := range cols {
		var name string
		switch t := c.(type) {
		case string:
			name = t
		case ValExprBuilder:
			if n, ok := t.ValExpr.(*ColName); ok {
				name = n.Name
				break
			}
		}
		var v ValExpr
		if len(name) == 0 {
			v = makeErrVal("unsupported type %T: %v", c, c)
		} else if b.leftTable.column(name) == nil ||
			b.rightTable.column(name) == nil {
			v = makeErrVal("invalid join column: %s", name)
		} else {
			v = &ColName{Name: name}
		}
		vals = append(vals, &NonStarExpr{Expr: v})
	}
	b.Cond = &UsingJoinCond{Cols: vals}
	return b
}
514324
func (p *Parser) Use(f ...func(string) (string, error)) {
	p.middleware = append(p.middleware, f...)
}
369599
func (pool *Pool) Use(conf Config) *Pool {
	pool.conf = conf
	return pool
}
635912
func (query Query) Join(collection string, condition ...c.Condition) Query {
	return query.JoinWith("JOIN", collection, condition...)
}
209730
func OpenUsing(path string, runtimeConfig map[string]interface{}) (Index, error) {
	return openIndexUsing(path, runtimeConfig)
}
1357882
func (t *Tango) Use(handlers ...Handler) {
	t.handlers = append(t.handlers, handlers...)
}
602161
func (g *routeGroup) Use(m ...Middleware) {
	g.middleware = append(g.middleware, m...)
}
65345
func Join(ss ...[]string) []string {
	used := map[string]bool{}
	var s []string
	for _, tmp := range ss {
		for _, w := range tmp {
			if !used[w] {
				s = append(s, w)
			}
			used[w] = true
		}
	}
	return s
}
591101
func (qb *TiDBQueryBuilder) Having(cond string) QueryBuilder {
	qb.Tokens = append(qb.Tokens, "HAVING", cond)
	return qb
}
175112
func (db *Database) Joins(joins string) *Database {
	db = db.clone()
	db.joinTables = append(db.joinTables, joins)
	// we can't infer model from the join string (can contain everything)
	return db
}
1353726
func (p *queryPlan) having() error {
	if p.stm.HasHavingClause() {
		tracer.Trace(p.tracer, func() []string {
			return []string{"Having filtering"}
		})
		eval := p.stm.HavingEvaluator()
		ok := true
		var eErr error
		p.tbl.Filter(func(r table.Row) bool {
			b, err := eval.Evaluate(r)
			if err != nil {
				ok, eErr = false, err
			}
			return !b
		})
		if !ok {
			return eErr
		}
	}
	return nil
}
986465
func (app *App) Use(handle Middleware) *App {
	app.mds = append(app.mds, handle)
	return app
}
57303
func havingExpressionBuilder() ClauseHook {
	var f ClauseHook
	f = func(s *Statement, _ Symbol) (ClauseHook, error) {
		s.havingExpressionEvaluator = &AlwaysReturn{V: true}
		if len(s.havingExpression) > 0 {
			eval, err := NewEvaluator(s.havingExpression)
			if err != nil {
				return nil, err
			}
			s.havingExpressionEvaluator = eval
		}
		return f, nil
	}
	return f
}
829196
func (e *Echo) Use(middleware ...interface{}) {
	for _, m := range middleware {
		e.ValidMiddleware(m)
		e.middleware = append(e.middleware, m)
		if e.MiddlewareDebug {
			e.logger.Debugf(`Middleware[Use](%p): [] -> %s `, m, HandlerName(m))
		}
	}
}
625046
func (o *Output) Used() bool {
	o.Lock()
	defer o.Unlock()
	return o.used
}
545603
func Usage(format string, a ...interface{}) {
	console.ErrStyle("usage", format, a...)
	os.Exit(BadUsage)
}
507473
func (c *Command) UsagePadding() int {
	if c.parent == nil || minUsagePadding > c.parent.commandsMaxUseLen {
		return minUsagePadding
	}
	return c.parent.commandsMaxUseLen
}