File tree Expand file tree Collapse file tree
branches/tswast-patch-1/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 @@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60- refs/heads/tswast-patch-1: 482954f2c5055231e5b3122ea91d2ba00ce8187c
60+ refs/heads/tswast-patch-1: 3d7ea2c955bb4886ffc1954badd98ce0eff9a8a4
6161refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b
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