File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
appengine/datastore/src/test/java/com/example/appengine Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -67,22 +67,22 @@ public void projectionQuery_grouping_filtersDuplicates() {
6767 putTestData ("some duplicate" , 0L );
6868 putTestData ("too big" , 1L );
6969
70+ // [START grouping]
7071 Query q = new Query ("TestKind" );
7172 q .addProjection (new PropertyProjection ("A" , String .class ));
7273 q .addProjection (new PropertyProjection ("B" , Long .class ));
7374 q .setDistinct (true );
7475 q .setFilter (Query .FilterOperator .LESS_THAN .of ("B" , 1L ));
7576 q .addSort ("B" , Query .SortDirection .DESCENDING );
7677 q .addSort ("A" );
78+ // [END grouping]
7779
7880 List <Entity > entities =
7981 datastore .prepare (q ).asList (FetchOptions .Builder .withLimit (5 ));
8082 assertThat (entities ).hasSize (1 );
81- // [START_EXCLUDE silent]
8283 Entity entity = entities .get (0 );
8384 assertThat ((String ) entity .getProperty ("A" )).named ("entity.A" ).isEqualTo ("some duplicate" );
8485 assertThat ((long ) entity .getProperty ("B" )).named ("entity.B" ).isEqualTo (0L );
85- // [END_EXCLUDE]
8686 }
8787
8888 private void putTestData (String a , long b ) {
You can’t perform that action at this time.
0 commit comments