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

Method Offset

datastore/query.go:242–254  ·  view source on GitHub ↗

Offset returns a derivative query that has an offset of how many keys to skip over before returning results. A negative value is invalid.

(offset int)

Source from the content-addressed store, hash-verified

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.
242func (q *Query) Offset(offset int) *Query {
243 q = q.clone()
244 if offset < 0 {
245 q.err = errors.New("datastore: negative query offset")
246 return q
247 }
248 if offset > math.MaxInt32 {
249 q.err = errors.New("datastore: query offset overflow")
250 return q
251 }
252 q.offset = int32(offset)
253 return q
254}
255
256// BatchSize returns a derivative query to fetch the supplied number of results
257// at once. This value should be greater than zero, and equal to or less than

Callers 2

TestQueriesAreImmutableFunction · 0.95
TestQueryToProtoFunction · 0.45

Calls 1

cloneMethod · 0.95

Tested by 2

TestQueriesAreImmutableFunction · 0.76
TestQueryToProtoFunction · 0.36