mongoose: add Query.maxTimeMS() (#35677)

This commit is contained in:
Hsu Ching Feng
2019-05-25 00:42:12 +08:00
committed by Ryan Cavanaugh
parent be367b428a
commit bc9a135f93
2 changed files with 5 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
// Type definitions for Mongoose 5.5
// Type definitions for Mongoose 5.5.1
// Project: http://mongoosejs.com/
// Definitions by: horiuchi <https://github.com/horiuchi>
// lukasz-zak <https://github.com/lukasz-zak>
@@ -1968,6 +1968,9 @@ declare module "mongoose" {
/** Specifies the maxScan option. Cannot be used with distinct() */
maxScan(val: number): this;
/** Specifies the maxTimeMS options. */
maxTimeMS(val: number): this;
/**
* Merges another Query or conditions object into this one.
* When a Query is passed, conditions, field selection and options are merged.

View File

@@ -1083,6 +1083,7 @@ query.find().lt('age', 21);
query.find().where('age').lte(21);
query.find().lte('age', 21);
query.maxDistance('path', 21).maxDistance(21);
query.maxTimeMS(1000);
query.maxscan(100).maxScan(100);
query.maxScan(100).maxScan(100);
query.merge(query).merge({});