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

Method Limit

v2/datastore/query.go:230–238  ·  view source on GitHub ↗

Limit returns a derivative query that has a limit on the number of results returned. A negative value means unlimited.

(limit int)

Source from the content-addressed store, hash-verified

228// Limit returns a derivative query that has a limit on the number of results
229// returned. A negative value means unlimited.
230func (q *Query) Limit(limit int) *Query {
231 q = q.clone()
232 if limit < math.MinInt32 || limit > math.MaxInt32 {
233 q.err = errors.New("datastore: query limit overflow")
234 return q
235 }
236 q.limit = int32(limit)
237 return q
238}
239
240// Offset returns a derivative query that has an offset of how many keys to
241// skip over before returning results. A negative value is invalid.

Callers 2

TestQueryToProtoFunction · 0.45
AllocateIDRangeFunction · 0.45

Calls 1

cloneMethod · 0.95

Tested by 1

TestQueryToProtoFunction · 0.36