Skip to content

Commit efa4251

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 3799 b: refs/heads/pubsub-alpha c: 3d7ea2c h: refs/heads/master i: 3797: 82e9a98 3795: 53d2dc4 3791: 9b9f5fb
1 parent 07f16e9 commit efa4251

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 36a62ef856d199f8efd09501b5ba65c422c01f23
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: 7406918e071dd2c5677a638ae2a06e7592b6542c
5-
refs/heads/pubsub-alpha: 482954f2c5055231e5b3122ea91d2ba00ce8187c
5+
refs/heads/pubsub-alpha: 3d7ea2c955bb4886ffc1954badd98ce0eff9a8a4
66
refs/heads/update-datastore: 47aae517c2cb33f1dccd909adaced73ec9d0f4df
77
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
88
refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd

branches/pubsub-alpha/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)