MCPcopy Create free account
hub / github.com/corestoreio/pkg / When

Method When

sql/dml/select.go:207–216  ·  view source on GitHub ↗

When applies the function `fn` query changes if the given "test" is true. Providing the optional second function, uses it as the default value, if test is false. `defaultFn` can be nil.

(test bool, fn func(*Select), defaultFn func(*Select))

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

UnlessMethod · 0.95
TestSelect_When_UnlessFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestSelect_When_UnlessFunction · 0.64