1- // Copyright 2022 Google LLC
1+ // Copyright 2023 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -99,6 +99,11 @@ message Query {
9999 // The properties to make distinct. The query results will contain the first
100100 // result for each distinct combination of values for the given properties
101101 // (if empty, all results are returned).
102+ //
103+ // Requires:
104+ //
105+ // * If `order` is specified, the set of distinct on properties must appear
106+ // before the non-distinct on properties in `order`.
102107 repeated PropertyReference distinct_on = 6 ;
103108
104109 // A starting point for the query results. Query cursors are
@@ -127,7 +132,7 @@ message Query {
127132// Datastore query for running an aggregation over a
128133// [Query][google.datastore.v1.Query].
129134message AggregationQuery {
130- // Defines a aggregation that produces a single result.
135+ // Defines an aggregation that produces a single result.
131136 message Aggregation {
132137 // Count of entities that match the query.
133138 //
@@ -138,7 +143,7 @@ message AggregationQuery {
138143 // count.
139144 //
140145 // This provides a way to set an upper bound on the number of entities
141- // to scan, limiting latency and cost.
146+ // to scan, limiting latency, and cost.
142147 //
143148 // Unspecified is interpreted as no bound.
144149 //
@@ -175,7 +180,7 @@ message AggregationQuery {
175180 // COUNT_UP_TO(1) AS count_up_to_1,
176181 // COUNT_UP_TO(2),
177182 // COUNT_UP_TO(3) AS count_up_to_3,
178- // COUNT_UP_TO(4 )
183+ // COUNT(* )
179184 // OVER (
180185 // ...
181186 // );
@@ -188,7 +193,7 @@ message AggregationQuery {
188193 // COUNT_UP_TO(1) AS count_up_to_1,
189194 // COUNT_UP_TO(2) AS property_1,
190195 // COUNT_UP_TO(3) AS count_up_to_3,
191- // COUNT_UP_TO(4 ) AS property_2
196+ // COUNT(* ) AS property_2
192197 // OVER (
193198 // ...
194199 // );
0 commit comments