Skip to content

Commit 19a9072

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 7143 b: refs/heads/tswast-patch-1 c: 3d7ea2c h: refs/heads/master i: 7141: be36e90 7139: a835990 7135: 36dea59
1 parent edbf014 commit 19a9072

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 482954f2c5055231e5b3122ea91d2ba00ce8187c
60+
refs/heads/tswast-patch-1: 3d7ea2c955bb4886ffc1954badd98ce0eff9a8a4
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/QueryResults.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,21 @@ public interface QueryResults<V> extends Iterator<V> {
3535
Class<?> resultClass();
3636

3737
/**
38-
* Returns the Cursor for point after the value returned in the last {@link #next} call.
38+
* Returns the Cursor for the point after the value returned in the last {@link #next} call. This
39+
* cursor can be used to issue subsequent queries (with the same constraints) that may return
40+
* additional results.
41+
*
42+
* <p>A simple use case:
43+
* <pre> {@code
44+
* Query<Entity> query = Query.entityQueryBuilder()
45+
* .kind("Person")
46+
* .filter(PropertyFilter.eq("favoriteFood", "pizza"))
47+
* .build();
48+
* QueryResults<Entity> results = datastore.run(query);
49+
* // Consume some results (using results.next()) and do any other actions as necessary.
50+
* query = query.toBuilder().startCursor(results.cursorAfter()).build();
51+
* results = datastore.run(query); // now we will iterate over all entities not yet consumed
52+
* </pre>
3953
*/
4054
Cursor cursorAfter();
4155
}

0 commit comments

Comments
 (0)