mongoose: query wtimeout (#39679)

This commit is contained in:
Emmanuel Gautier
2019-10-29 12:56:03 -07:00
committed by Jesse Trinity
parent 9da84cc5d7
commit e827c04548
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -2244,6 +2244,8 @@ declare module "mongoose" {
within(val?: any): this;
within(coordinate: number[], ...coordinatePairs: number[][]): this;
wtimeout(ms?: number): this;
/** Flag to opt out of using $geoWithin. */
static use$geoWithin: boolean;
}
+2
View File
@@ -1037,6 +1037,8 @@ query.batchSize(100).batchSize(100);
var lowerLeft = [40.73083, -73.99756]
var upperRight = [40.741404, -73.988135]
query.where('loc').within().box(lowerLeft, upperRight)
query.where('loc').wtimeout()
query.where('loc').wtimeout(10)
query.box({ ll : lowerLeft, ur : upperRight }).box({});
var queryModel = mongoose.model('QModel')
query.cast(new queryModel(), {}).hasOwnProperty('');