File tree Expand file tree Collapse file tree
branches/gcs-nio/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ refs/tags/v0.0.12: 2fd8066e891fb3dfea69b65f6bf6461db79342b9
1111refs/heads/compute-alpha: 969cba2627f1d53d352cc4a5ffe0879dacf65e6c
1212refs/heads/dns-alpha: 2f90e7e338349287ace33375896907af0f032ca1
1313refs/heads/dns-alpha-batch: 17442b07867021b85d0452f5f3eda29a3413288f
14- refs/heads/gcs-nio: 482954f2c5055231e5b3122ea91d2ba00ce8187c
14+ refs/heads/gcs-nio: 3d7ea2c955bb4886ffc1954badd98ce0eff9a8a4
1515refs/heads/logging-alpha: db5312bffa7fccac194f6a7feb8cc3066de16aff
1616refs/tags/v0.1.0: a615317f7424ed58621b1f65d5c4d8cbbe8a6ed8
1717refs/tags/v0.1.1: 7a7f6985fe465e9dd6a075af55493f42b4933be0
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments