MCPcopy
hub / github.com/ent/ent / WithContext

Method WithContext

dialect/sql/builder.go:1708–1714  ·  view source on GitHub ↗

WithContext sets the context into the *Selector.

(ctx context.Context)

Source from the content-addressed store, hash-verified

1706
1707// WithContext sets the context into the *Selector.
1708func (s *Selector) WithContext(ctx context.Context) *Selector {
1709 if ctx == nil {
1710 panic("nil context")
1711 }
1712 s.ctx = ctx
1713 return s
1714}
1715
1716// Context returns the Selector context or Background
1717// if nil.

Callers 15

sqlQueryMethod · 0.80
sqlQueryMethod · 0.80
sqlQueryMethod · 0.80
sqlQueryMethod · 0.80
sqlQueryMethod · 0.80
sqlQueryMethod · 0.80
sqlQueryMethod · 0.80
sqlQueryMethod · 0.80
sqlQueryMethod · 0.80
sqlQueryMethod · 0.80
TestBuilderContextFunction · 0.80
NewMethod · 0.80

Calls

no outgoing calls

Tested by 2

TestBuilderContextFunction · 0.64