Project returns a derivative query that yields only the given fields. It cannot be used with KeysOnly.
(fieldNames ...string)
| 193 | // Project returns a derivative query that yields only the given fields. It |
| 194 | // cannot be used with KeysOnly. |
| 195 | func (q *Query) Project(fieldNames ...string) *Query { |
| 196 | q = q.clone() |
| 197 | q.projection = append([]string(nil), fieldNames...) |
| 198 | return q |
| 199 | } |
| 200 | |
| 201 | // Distinct returns a derivative query that yields de-duplicated entities with |
| 202 | // respect to the set of projected fields. It is only used for projection |