Commit 759f79f
Chris Rossi
fix: use
Fixes a bug where we blithely assumed that if we sent
Datastore/Firestore a query with an offset, that the first batch returned
would skip the entire offset. In practice, for high offsets, it's possible
for Datastore/Firestore to return a results batch that is empty and
which has `skipped_results` set to some number less than the value of
`offset` that we sent it. In this case, we still need to send a value
for `offset` when retreiving the next batch. This patch uses
`skipped_results` to compute a new `offset` for the follow up batch.
Fixes #392skipped_results from query results to adjust offset (#399)1 parent de64eac commit 759f79f
File tree
3 files changed
+33
-2
lines changed- packages/google-cloud-ndb
- google/cloud/ndb
- tests
- system
- unit
3 files changed
+33
-2
lines changedLines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
319 | 324 | | |
320 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
321 | 328 | | |
322 | 329 | | |
323 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1752 | 1752 | | |
1753 | 1753 | | |
1754 | 1754 | | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
396 | 397 | | |
397 | 398 | | |
398 | 399 | | |
| |||
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
411 | | - | |
| 412 | + | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
| |||
0 commit comments