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)
| 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. |
| 242 | func (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 |