MCPcopy
hub / github.com/ent/ent / Select

Method Select

dialect/sql/builder.go:1752–1758  ·  view source on GitHub ↗

Select changes the columns selection of the SELECT statement. Empty selection means all columns *.

(columns ...string)

Source from the content-addressed store, hash-verified

1750// Select changes the columns selection of the SELECT statement.
1751// Empty selection means all columns *.
1752func (s *Selector) Select(columns ...string) *Selector {
1753 s.selection = make([]selection, len(columns))
1754 for i := range columns {
1755 s.selection[i] = selection{c: columns[i]}
1756 }
1757 return s
1758}
1759
1760// SelectDistinct selects distinct columns.
1761func (s *Selector) SelectDistinct(columns ...string) *Selector {

Callers 15

SelectDistinctMethod · 0.95
CountMethod · 0.95
RunMethod · 0.45
TestBuilderFunction · 0.45
TestSelector_OrderByExprFunction · 0.45
TestSelector_SelectExprFunction · 0.45
TestSelector_UnionFunction · 0.45
TestSelector_ExceptFunction · 0.45
TestSelector_IntersectFunction · 0.45
TestBuilderContextFunction · 0.45
TestParamFormatterFunction · 0.45
TestSelectWithLockFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestBuilderFunction · 0.36
TestSelector_OrderByExprFunction · 0.36
TestSelector_SelectExprFunction · 0.36
TestSelector_UnionFunction · 0.36
TestSelector_ExceptFunction · 0.36
TestSelector_IntersectFunction · 0.36
TestBuilderContextFunction · 0.36
TestParamFormatterFunction · 0.36
TestSelectWithLockFunction · 0.36
TestReusePredicatesFunction · 0.36