MCPcopy
hub / github.com/ent/ent / New

Method New

dialect/sql/builder.go:1699–1705  ·  view source on GitHub ↗

New returns a new Selector with the same dialect and context.

()

Source from the content-addressed store, hash-verified

1697
1698// New returns a new Selector with the same dialect and context.
1699func (s *Selector) New() *Selector {
1700 c := Dialect(s.dialect).Select()
1701 if s.ctx != nil {
1702 c = c.WithContext(s.ctx)
1703 }
1704 return c
1705}
1706
1707// WithContext sets the context into the *Selector.
1708func (s *Selector) WithContext(ctx context.Context) *Selector {

Callers 15

mainFunction · 0.80
privacy.goFile · 0.80
NewCmdFunction · 0.80
DependencyTypeFunction · 0.80
DependencyTypeInfoFunction · 0.80
TypesFunction · 0.80
IndexesFunction · 0.80
SanityFunction · 0.80
PagingFunction · 0.80
SelectFunction · 0.80
ExecQueryFunction · 0.80
NillableRequiredFunction · 0.80

Calls 3

DialectFunction · 0.85
WithContextMethod · 0.80
SelectMethod · 0.45

Tested by 15

TypesFunction · 0.64
IndexesFunction · 0.64
SanityFunction · 0.64
PagingFunction · 0.64
SelectFunction · 0.64
ExecQueryFunction · 0.64
NillableRequiredFunction · 0.64
PredicateFunction · 0.64
AddValuesFunction · 0.64
DeleteFunction · 0.64
RelationFunction · 0.64
UniqueConstraintFunction · 0.64