adds ability to set hint on Parse.Query #6288 (#6322)

* added hint to aggregate

* added support for hint in query

* added else clause to aggregate

* fixed tests

* updated tests

* Add tests and clean up

* Add support for explain

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
This commit is contained in:
stevestencil
2020-01-14 01:14:43 -07:00
committed by Diamond Lewis
parent 5a1d94ed88
commit 9842c6ee42
9 changed files with 267 additions and 21 deletions

View File

@@ -14,6 +14,8 @@ export type QueryOptions = {
distinct?: boolean,
pipeline?: any,
readPreference?: ?string,
hint?: ?mixed,
explain?: Boolean,
};
export type UpdateQueryOptions = {
@@ -92,7 +94,8 @@ export interface StorageAdapter {
schema: SchemaType,
query: QueryType,
readPreference?: string,
estimate?: boolean
estimate?: boolean,
hint?: mixed
): Promise<number>;
distinct(
className: string,
@@ -104,7 +107,9 @@ export interface StorageAdapter {
className: string,
schema: any,
pipeline: any,
readPreference: ?string
readPreference: ?string,
hint: ?mixed,
explain?: boolean
): Promise<any>;
performInitialization(options: ?any): Promise<void>;