Skip to content

Commit 1733072

Browse files
committed
Revert "aggregation query request"
This reverts commit 0f2bd32.
1 parent 5469ebc commit 1733072

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/request.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -772,16 +772,18 @@ class DatastoreRequest {
772772
);
773773
} else {
774774
const aggregationQueryOptions: AggregationQueryOptions = {
775-
nestedQuery: queryProto,
775+
query_type: {
776+
nested_query: queryProto,
777+
},
776778
aggregations: query.aggregations
777779
};
778780
const reqOpts: RunAggregationQueryRequest = Object.assign(
779781
sharedQueryOpts,
780-
// {query_type:
782+
{query_type:
781783
{
782-
aggregationQuery: aggregationQueryOptions
784+
aggregation_query: aggregationQueryOptions
783785
}
784-
// }
786+
}
785787
);
786788
console.log('Aggregate');
787789
console.log(reqOpts);
@@ -1121,12 +1123,14 @@ export interface RequestOptions extends SharedQueryOptions{
11211123
entityFilter?: google.datastore.admin.v1.IEntityFilter;
11221124
}
11231125
export interface RunAggregationQueryRequest extends SharedQueryOptions{
1124-
// query_type: {
1125-
aggregationQuery: AggregationQueryOptions
1126-
// }
1126+
query_type: {
1127+
aggregation_query: AggregationQueryOptions
1128+
}
11271129
}
11281130
export interface AggregationQueryOptions {
1129-
nestedQuery: QueryProto,
1131+
query_type: {
1132+
nested_query: QueryProto,
1133+
}
11301134
aggregations: Array<any>
11311135
}
11321136
export type RunQueryStreamOptions = RunQueryOptions;

0 commit comments

Comments
 (0)