Skip to content

Commit 549363d

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 4237 b: refs/heads/gcs-nio c: 3d7ea2c h: refs/heads/master i: 4235: c0d1b08
1 parent e34b53f commit 549363d

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
@@ -11,7 +11,7 @@ refs/tags/v0.0.12: 2fd8066e891fb3dfea69b65f6bf6461db79342b9
1111
refs/heads/compute-alpha: 969cba2627f1d53d352cc4a5ffe0879dacf65e6c
1212
refs/heads/dns-alpha: 2f90e7e338349287ace33375896907af0f032ca1
1313
refs/heads/dns-alpha-batch: 17442b07867021b85d0452f5f3eda29a3413288f
14-
refs/heads/gcs-nio: 482954f2c5055231e5b3122ea91d2ba00ce8187c
14+
refs/heads/gcs-nio: 3d7ea2c955bb4886ffc1954badd98ce0eff9a8a4
1515
refs/heads/logging-alpha: db5312bffa7fccac194f6a7feb8cc3066de16aff
1616
refs/tags/v0.1.0: a615317f7424ed58621b1f65d5c4d8cbbe8a6ed8
1717
refs/tags/v0.1.1: 7a7f6985fe465e9dd6a075af55493f42b4933be0

branches/gcs-nio/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)