MCPcopy
hub / github.com/Masterminds/squirrel / Where

Method Where

select.go:342–347  ·  view source on GitHub ↗

Where adds an expression to the WHERE clause of the query. Expressions are ANDed together in the generated SQL. Where accepts several types for its pred argument: nil OR "" - ignored. string - SQL expression. If the expression has SQL placeholders then a set of arguments must be passed as well,

(pred interface{}, args ...interface{})

Source from the content-addressed store, hash-verified

340//
341// Where will panic if pred isn't any of the above types.
342func (b SelectBuilder) Where(pred interface{}, args ...interface{}) SelectBuilder {
343 if pred == nil || pred == "" {
344 return b
345 }
346 return builder.Append(b, "WhereParts", newWherePart(pred, args...)).(SelectBuilder)
347}
348
349// GroupBy adds GROUP BY expressions to the query.
350func (b SelectBuilder) GroupBy(groupBys ...string) SelectBuilder {

Callers

nothing calls this directly

Calls 1

newWherePartFunction · 0.85

Tested by

no test coverage detected