MCPcopy
hub / github.com/ent/ent / arg

Method arg

dialect/sql/builder.go:1389–1398  ·  view source on GitHub ↗

arg calls Builder.Arg, but wraps `a` with parens in case of a Selector.

(b *Builder, a any)

Source from the content-addressed store, hash-verified

1387
1388// arg calls Builder.Arg, but wraps `a` with parens in case of a Selector.
1389func (*Predicate) arg(b *Builder, a any) {
1390 switch a.(type) {
1391 case *Selector:
1392 b.Wrap(func(b *Builder) {
1393 b.Arg(a)
1394 })
1395 default:
1396 b.Arg(a)
1397 }
1398}
1399
1400// clone returns a shallow clone of p.
1401func (p *Predicate) clone() *Predicate {

Callers 6

EQMethod · 0.95
NEQMethod · 0.95
LTMethod · 0.95
LTEMethod · 0.95
GTMethod · 0.95
GTEMethod · 0.95

Calls 2

WrapMethod · 0.80
ArgMethod · 0.80

Tested by

no test coverage detected