MCPcopy Create free account
hub / github.com/golang/appengine / DistinctOn

Method DistinctOn

datastore/query.go:214–218  ·  view source on GitHub ↗

DistinctOn returns a derivative query that yields de-duplicated entities with respect to the set of the specified fields. It is only used for projection queries. The field list should be a subset of the projected field list. DistinctOn cannot be used with Distinct.

(fieldNames ...string)

Source from the content-addressed store, hash-verified

212// queries. The field list should be a subset of the projected field list.
213// DistinctOn cannot be used with Distinct.
214func (q *Query) DistinctOn(fieldNames ...string) *Query {
215 q = q.clone()
216 q.distinctOn = fieldNames
217 return q
218}
219
220// KeysOnly returns a derivative query that yields only keys, not keys and
221// entities. It cannot be used with projection queries.

Callers 1

TestQueryToProtoFunction · 0.45

Calls 1

cloneMethod · 0.95

Tested by 1

TestQueryToProtoFunction · 0.36