* 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:
committed by
Diamond Lewis
parent
5a1d94ed88
commit
9842c6ee42
@@ -173,6 +173,8 @@ export class ClassesRouter extends PromiseRouter {
|
||||
'readPreference',
|
||||
'includeReadPreference',
|
||||
'subqueryReadPreference',
|
||||
'hint',
|
||||
'explain',
|
||||
];
|
||||
|
||||
for (const key of Object.keys(body)) {
|
||||
@@ -219,6 +221,15 @@ export class ClassesRouter extends PromiseRouter {
|
||||
if (typeof body.subqueryReadPreference === 'string') {
|
||||
options.subqueryReadPreference = body.subqueryReadPreference;
|
||||
}
|
||||
if (
|
||||
body.hint &&
|
||||
(typeof body.hint === 'string' || typeof body.hint === 'object')
|
||||
) {
|
||||
options.hint = body.hint;
|
||||
}
|
||||
if (body.explain) {
|
||||
options.explain = body.explain;
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user