InterfaceLoggableQuery
talawa-api • Docs
talawa-api / libraries/dbLogger / InterfaceLoggableQuery
Interface: InterfaceLoggableQuery<T>
Interface for a query that can include logging information.
Extends
Query
<unknown
,T
>
Type Parameters
• T
Properties
[toStringTag]
> [toStringTag]: string
Inherited from
Query.[toStringTag]
Defined in
node_modules/mongoose/types/query.d.ts:269
_mongooseOptions
> _mongooseOptions: MongooseQueryOptions
<T
, "timestamps"
| MongooseBaseQueryOptionKeys
| "lean"
>
Inherited from
Query._mongooseOptions
Defined in
node_modules/mongoose/types/query.d.ts:209
catch()
> catch: <TResult
>(onrejected
?) => Promise
<unknown
>
Executes the query returning a Promise
which will be
resolved with either the doc(s) or rejected with the error.
Like .then()
, but only takes a rejection handler.
Attaches a callback for only the rejection of the Promise.
Type Parameters
• TResult = never
Parameters
• onrejected?: null
| (reason
) => TResult
| PromiseLike
<TResult
>
The callback to execute when the Promise is rejected.
Returns
Promise
<unknown
>
A Promise for the completion of the callback.
Inherited from
Query.catch
Defined in
node_modules/mongoose/types/query.d.ts:260
finally()
> finally: (onfinally
?) => Promise
<unknown
>
Executes the query returning a Promise
which will be
resolved with .finally()
chained.
Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
Parameters
• onfinally?: null
| () => void
The callback to execute when the Promise is settled (fulfilled or rejected).
Returns
Promise
<unknown
>
A Promise for the completion of the callback.
Inherited from
Query.finally
Defined in
node_modules/mongoose/types/query.d.ts:266
logInfo?
> optional
logInfo: TransactionLogInfo
Information about the transaction log (optional)
Defined in
model
> model: Model
<any
, object
, object
, object
, any
, any
>
The model this query was created from
Inherited from
Query.model
Defined in
node_modules/mongoose/types/query.d.ts:567
then()
> then: <TResult1
, TResult2
>(onfulfilled
?, onrejected
?) => Promise
<TResult1
| TResult2
>
Executes the query returning a Promise
which will be
resolved with either the doc(s) or rejected with the error.
Attaches callbacks for the resolution and/or rejection of the Promise.
Type Parameters
• TResult1 = unknown
• TResult2 = never
Parameters
• onfulfilled?: null
| (value
) => TResult1
| PromiseLike
<TResult1
>
The callback to execute when the Promise is resolved.
• onrejected?: null
| (reason
) => TResult2
| PromiseLike
<TResult2
>
The callback to execute when the Promise is rejected.
Returns
Promise
<TResult1
| TResult2
>
A Promise for the completion of which ever callback is executed.
Inherited from
Query.then
Defined in
node_modules/mongoose/types/query.d.ts:744
Methods
$where()
> $where(argument
): Query
<T
[], T
, object
, T
, "find"
, Record
<string
, never
>>
Parameters
• argument: string
| Function
Returns
Query
<T
[], T
, object
, T
, "find"
, Record
<string
, never
>>
Inherited from
Query.$where
Defined in
node_modules/mongoose/types/query.d.ts:221
[asyncIterator]()
> [asyncIterator](): AsyncIterableIterator
<unknown
>
Returns a wrapper around a mongodb driver cursor.
A QueryCursor exposes a Streams3 interface, as well as a .next()
function.
This is equivalent to calling .cursor()
with no arguments.
Returns
AsyncIterableIterator
<unknown
>
Inherited from
Query.[asyncIterator]
Defined in
node_modules/mongoose/types/query.d.ts:216
all()
all(path, val)
> all(path
, val
): this
Specifies an $all
query condition. When called with one argument, the most recent path passed to where()
is used.
Parameters
• path: string
• val: any
[]
Returns
this
Inherited from
Query.all
Defined in
node_modules/mongoose/types/query.d.ts:230
all(val)
> all(val
): this
Parameters
• val: any
[]
Returns
this
Inherited from
Query.all
Defined in
node_modules/mongoose/types/query.d.ts:231
allowDiskUse()
> allowDiskUse(value
): this
Sets the allowDiskUse option for the query (ignored for < 4.4.0)
Parameters
• value: boolean
Returns
this
Inherited from
Query.allowDiskUse
Defined in
node_modules/mongoose/types/query.d.ts:234
and()
> and(array
): this
Specifies arguments for an $and
condition.
Parameters
• array: FilterQuery
<T
>[]
Returns
this
Inherited from
Query.and
Defined in
node_modules/mongoose/types/query.d.ts:237
batchSize()
> batchSize(val
): this
Specifies the batchSize option.
Parameters
• val: number
Returns
this
Inherited from
Query.batchSize
Defined in
node_modules/mongoose/types/query.d.ts:240
box()
box(lower, upper)
> box(lower
, upper
): this
Specifies a $box
condition
Parameters
• lower: number
[]
• upper: number
[]
Returns
this
Inherited from
Query.box
Defined in
node_modules/mongoose/types/query.d.ts:243
box(val)
> box(val
): this
Parameters
• val: any
Returns
this
Inherited from
Query.box
Defined in
node_modules/mongoose/types/query.d.ts:244
cast()
> cast(model
?, obj
?): any
Casts this query to the schema of model
.
Parameters
• model?: null
| Model
<any
, object
, object
, object
, any
, any
>
the model to cast to. If not set, defaults to this.model
• obj?: any
If not set, defaults to this query's conditions
Returns
any
the casted obj
Inherited from
Query.cast
Defined in
node_modules/mongoose/types/query.d.ts:253
circle()
circle(path, area)
> circle(path
, area
): this
Specifies a $center
or $centerSphere
condition.
Parameters
• path: string
• area: any
Returns
this
Inherited from
Query.circle
Defined in
node_modules/mongoose/types/query.d.ts:272
circle(area)
> circle(area
): this
Parameters
• area: any
Returns
this
Inherited from
Query.circle
Defined in
node_modules/mongoose/types/query.d.ts:273
clone()
> clone(): this
Make a copy of this query so you can re-execute it.
Returns
this
Inherited from
Query.clone
Defined in
node_modules/mongoose/types/query.d.ts:276
collation()
> collation(value
): this
Adds a collation to this op (MongoDB 3.4 and up)
Parameters
• value: CollationOptions
Returns
this
Inherited from
Query.collation
Defined in
node_modules/mongoose/types/query.d.ts:279
comment()
> comment(val
): this
Specifies the comment
option.
Parameters
• val: string
Returns
this
Inherited from
Query.comment
Defined in
node_modules/mongoose/types/query.d.ts:282
countDocuments()
> countDocuments(criteria
?, options
?): Query
<number
, T
, object
, T
, "countDocuments"
, Record
<string
, never
>>
Specifies this query as a countDocuments
query.
Parameters
• criteria?: FilterQuery
<T
>
• options?: QueryOptions
<T
>
Returns
Query
<number
, T
, object
, T
, "countDocuments"
, Record
<string
, never
>>
Inherited from
Query.countDocuments
Defined in
node_modules/mongoose/types/query.d.ts:285
cursor()
> cursor(options
?): Cursor
<unknown
, QueryOptions
<T
>>
Returns a wrapper around a mongodb driver cursor.
A QueryCursor exposes a Streams3 interface, as well as a .next()
function.
Parameters
• options?: QueryOptions
<T
>
Returns
Cursor
<unknown
, QueryOptions
<T
>>
Inherited from
Query.cursor
Defined in
node_modules/mongoose/types/query.d.ts:294
deleteMany()
deleteMany(filter, options)
> deleteMany(filter
?, options
?): Query
<any
, T
, object
, T
, "deleteMany"
, Record
<string
, never
>>
Declare and/or execute this query as a deleteMany()
operation. Works like
remove, except it deletes every document that matches filter
in the
collection, regardless of the value of single
.
Parameters
• filter?: FilterQuery
<T
>
• options?: QueryOptions
<T
>
Returns
Query
<any
, T
, object
, T
, "deleteMany"
, Record
<string
, never
>>
Inherited from
Query.deleteMany
Defined in
node_modules/mongoose/types/query.d.ts:301
deleteMany(filter)
> deleteMany(filter
): Query
<any
, T
, object
, T
, "deleteMany"
, Record
<string
, never
>>
Parameters
• filter: FilterQuery
<T
>
Returns
Query
<any
, T
, object
, T
, "deleteMany"
, Record
<string
, never
>>
Inherited from
Query.deleteMany
Defined in
node_modules/mongoose/types/query.d.ts:305
deleteMany()
> deleteMany(): Query
<any
, T
, object
, T
, "deleteMany"
, Record
<string
, never
>>
Returns
Query
<any
, T
, object
, T
, "deleteMany"
, Record
<string
, never
>>
Inherited from
Query.deleteMany
Defined in
node_modules/mongoose/types/query.d.ts:312
deleteOne()
deleteOne(filter, options)
> deleteOne(filter
?, options
?): Query
<any
, T
, object
, T
, "deleteOne"
, Record
<string
, never
>>
Declare and/or execute this query as a deleteOne()
operation. Works like
remove, except it deletes at most one document regardless of the single
option.
Parameters
• filter?: FilterQuery
<T
>
• options?: QueryOptions
<T
>
Returns
Query
<any
, T
, object
, T
, "deleteOne"
, Record
<string
, never
>>
Inherited from
Query.deleteOne
Defined in
node_modules/mongoose/types/query.d.ts:319
deleteOne(filter)
> deleteOne(filter
): Query
<any
, T
, object
, T
, "deleteOne"
, Record
<string
, never
>>
Parameters
• filter: FilterQuery
<T
>
Returns
Query
<any
, T
, object
, T
, "deleteOne"
, Record
<string
, never
>>
Inherited from
Query.deleteOne
Defined in
node_modules/mongoose/types/query.d.ts:323
deleteOne()
> deleteOne(): Query
<any
, T
, object
, T
, "deleteOne"
, Record
<string
, never
>>
Returns
Query
<any
, T
, object
, T
, "deleteOne"
, Record
<string
, never
>>
Inherited from
Query.deleteOne
Defined in
node_modules/mongoose/types/query.d.ts:330
distinct()
> distinct<DocKey
, ResultType
>(field
, filter
?): Query
<DocKey
extends keyof T
? Unpacked
<T
[DocKey
<DocKey
>]> : ResultType
[], T
, object
, T
, "distinct"
, Record
<string
, never
>>
Creates a distinct
query: returns the distinct values of the given field
that match filter
.
Type Parameters
• DocKey extends string
• ResultType = unknown
Parameters
• field: DocKey
• filter?: FilterQuery
<T
>
Returns
Query
<DocKey
extends keyof T
? Unpacked
<T
[DocKey
<DocKey
>]> : ResultType
[], T
, object
, T
, "distinct"
, Record
<string
, never
>>
Inherited from
Query.distinct
Defined in
node_modules/mongoose/types/query.d.ts:333
elemMatch()
elemMatch(path, val)
> elemMatch<K
>(path
, val
): this
Specifies a $elemMatch
query condition. When called with one argument, the most recent path passed to where()
is used.
Type Parameters
• K = string
Parameters
• path: K
• val: any
Returns
this
Inherited from
Query.elemMatch
Defined in
node_modules/mongoose/types/query.d.ts:339
elemMatch(val)
> elemMatch(val
): this
Parameters
• val: any
Returns
this
Inherited from
Query.elemMatch
Defined in
node_modules/mongoose/types/query.d.ts:340
equals()
> equals(val
): this
Specifies the complementary comparison value for paths specified with where()
Parameters
• val: any
Returns
this
Inherited from
Query.equals
Defined in
node_modules/mongoose/types/query.d.ts:350
error()
error()
> error(): null
| NativeError
Gets/sets the error flag on this query. If this flag is not null or
undefined, the exec()
promise will reject without executing.
Returns
null
| NativeError
Inherited from
Query.error
Defined in
node_modules/mongoose/types/query.d.ts:346
error(val)
> error(val
): this
Parameters
• val: null
| NativeError
Returns
this
Inherited from
Query.error
Defined in
node_modules/mongoose/types/query.d.ts:347
estimatedDocumentCount()
> estimatedDocumentCount(options
?): Query
<number
, T
, object
, T
, "estimatedDocumentCount"
, Record
<string
, never
>>
Creates a estimatedDocumentCount
query: counts the number of documents in the collection.
Parameters
• options?: QueryOptions
<T
>
Returns
Query
<number
, T
, object
, T
, "estimatedDocumentCount"
, Record
<string
, never
>>
Inherited from
Query.estimatedDocumentCount
Defined in
node_modules/mongoose/types/query.d.ts:353
exec()
> exec(): Promise
<unknown
>
Executes the query
Returns
Promise
<unknown
>
Inherited from
Query.exec
Defined in
node_modules/mongoose/types/query.d.ts:219
exists()
exists(path, val)
> exists<K
>(path
, val
): this
Specifies a $exists
query condition. When called with one argument, the most recent path passed to where()
is used.
Type Parameters
• K = string
Parameters
• path: K
• val: boolean
Returns
this
Inherited from
Query.exists
Defined in
node_modules/mongoose/types/query.d.ts:362
exists(val)
> exists(val
): this
Parameters
• val: boolean
Returns
this
Inherited from
Query.exists
Defined in
node_modules/mongoose/types/query.d.ts:363
explain()
> explain(verbose
?): this
Sets the explain
option,
which makes this query return detailed execution stats instead of the actual
query result. This method is useful for determining what index your queries
use.
Parameters
• verbose?: ExplainVerbosityLike
Returns
this
Inherited from
Query.explain
Defined in
node_modules/mongoose/types/query.d.ts:371
find()
find(filter, projection, options)
> find(filter
, projection
?, options
?): Query
<T
[], T
, object
, T
, "find"
, Record
<string
, never
>>
Creates a find
query: gets a list of documents that match filter
.
Parameters
• filter: FilterQuery
<T
>
• projection?: null
| ProjectionType
<T
>
• options?: null
| QueryOptions
<T
>
Returns
Query
<T
[], T
, object
, T
, "find"
, Record
<string
, never
>>
Inherited from
Query.find
Defined in
node_modules/mongoose/types/query.d.ts:374
find(filter, projection)
> find(filter
, projection
?): Query
<T
[], T
, object
, T
, "find"
, Record
<string
, never
>>
Parameters
• filter: FilterQuery
<T
>
• projection?: null
| ProjectionType
<T
>
Returns
Query
<T
[], T
, object
, T
, "find"
, Record
<string
, never
>>
Inherited from
Query.find
Defined in
node_modules/mongoose/types/query.d.ts:379
find(filter)
> find(filter
): Query
<T
[], T
, object
, T
, "find"
, Record
<string
, never
>>
Parameters
• filter: FilterQuery
<T
>
Returns
Query
<T
[], T
, object
, T
, "find"
, Record
<string
, never
>>
Inherited from
Query.find
Defined in
node_modules/mongoose/types/query.d.ts:383
find()
> find(): Query
<T
[], T
, object
, T
, "find"
, Record
<string
, never
>>
Returns
Query
<T
[], T
, object
, T
, "find"
, Record
<string
, never
>>
Inherited from
Query.find
Defined in
node_modules/mongoose/types/query.d.ts:386
findById()
findById(id, projection, options)
> findById(id
, projection
?, options
?): Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Declares the query a findById operation. When executed, returns the document with the given _id
.
Parameters
• id: any
• projection?: null
| ProjectionType
<T
>
• options?: null
| QueryOptions
<T
>
Returns
Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Inherited from
Query.findById
Defined in
node_modules/mongoose/types/query.d.ts:426
findById(id, projection)
> findById(id
, projection
?): Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Parameters
• id: any
• projection?: null
| ProjectionType
<T
>
Returns
Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Inherited from
Query.findById
Defined in
node_modules/mongoose/types/query.d.ts:431
findById(id)
> findById(id
): Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Parameters
• id: any
Returns
Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Inherited from
Query.findById
Defined in
node_modules/mongoose/types/query.d.ts:435
findByIdAndDelete()
findByIdAndDelete(id, options)
> findByIdAndDelete(id
, options
): Query
<ModifyResult
<T
>, T
, object
, T
, "findOneAndDelete"
, Record
<string
, never
>>
Creates a findByIdAndDelete
query, filtering by the given _id
.
Parameters
• id: any
• options: QueryOptions
<T
> & object
Returns
Query
<ModifyResult
<T
>, T
, object
, T
, "findOneAndDelete"
, Record
<string
, never
>>
Inherited from
Query.findByIdAndDelete
Defined in
node_modules/mongoose/types/query.d.ts:440
findByIdAndDelete(id, options)
> findByIdAndDelete(id
?, options
?): Query
<null
| T
, T
, object
, T
, "findOneAndDelete"
, Record
<string
, never
>>
Parameters
• id?: any
• options?: null
| QueryOptions
<T
>
Returns
Query
<null
| T
, T
, object
, T
, "findOneAndDelete"
, Record
<string
, never
>>
Inherited from
Query.findByIdAndDelete
Defined in
node_modules/mongoose/types/query.d.ts:444
findByIdAndUpdate()
findByIdAndUpdate(id, update, options)
> findByIdAndUpdate(id
, update
, options
): Query
<any
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Creates a findOneAndUpdate
query, filtering by the given _id
.
Parameters
• id: any
• update: UpdateQuery
<T
>
• options: QueryOptions
<T
> & object
Returns
Query
<any
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Inherited from
Query.findByIdAndUpdate
Defined in
node_modules/mongoose/types/query.d.ts:450
findByIdAndUpdate(id, update, options)
> findByIdAndUpdate(id
, update
, options
): Query
<T
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Parameters
• id: any
• update: UpdateQuery
<T
>
• options: QueryOptions
<T
> & object
& ReturnsNewDoc
Returns
Query
<T
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Inherited from
Query.findByIdAndUpdate
Defined in
node_modules/mongoose/types/query.d.ts:455
findByIdAndUpdate(id, update, options)
> findByIdAndUpdate(id
?, update
?, options
?): Query
<null
| T
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Parameters
• id?: any
• update?: UpdateQuery
<T
>
• options?: null
| QueryOptions
<T
>
Returns
Query
<null
| T
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Inherited from
Query.findByIdAndUpdate
Defined in
node_modules/mongoose/types/query.d.ts:460
findByIdAndUpdate(id, update)
> findByIdAndUpdate(id
, update
): Query
<null
| T
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Parameters
• id: any
• update: UpdateQuery
<T
>
Returns
Query
<null
| T
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Inherited from
Query.findByIdAndUpdate
Defined in
node_modules/mongoose/types/query.d.ts:465
findOne()
findOne(filter, projection, options)
> findOne(filter
?, projection
?, options
?): Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Declares the query a findOne operation. When executed, returns the first found document.
Parameters
• filter?: FilterQuery
<T
>
• projection?: null
| ProjectionType
<T
>
• options?: null
| QueryOptions
<T
>
Returns
Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Inherited from
Query.findOne
Defined in
node_modules/mongoose/types/query.d.ts:389
findOne(filter, projection)
> findOne(filter
?, projection
?): Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Parameters
• filter?: FilterQuery
<T
>
• projection?: null
| ProjectionType
<T
>
Returns
Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Inherited from
Query.findOne
Defined in
node_modules/mongoose/types/query.d.ts:394
findOne(filter)
> findOne(filter
?): Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Parameters
• filter?: FilterQuery
<T
>
Returns
Query
<null
| T
, T
, object
, T
, "findOne"
, Record
<string
, never
>>
Inherited from
Query.findOne
Defined in
node_modules/mongoose/types/query.d.ts:398
findOneAndDelete()
> findOneAndDelete(filter
?, options
?): Query
<null
| T
, T
, object
, T
, "findOneAndDelete"
, Record
<string
, never
>>
Creates a findOneAndDelete
query: atomically finds the given document, deletes it, and returns the document as it was before deletion.
Parameters
• filter?: FilterQuery
<T
>
• options?: null
| QueryOptions
<T
>
Returns
Query
<null
| T
, T
, object
, T
, "findOneAndDelete"
, Record
<string
, never
>>
Inherited from
Query.findOneAndDelete
Defined in
node_modules/mongoose/types/query.d.ts:403
findOneAndUpdate()
findOneAndUpdate(filter, update, options)
> findOneAndUpdate(filter
, update
, options
): Query
<ModifyResult
<T
>, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Creates a findOneAndUpdate
query: atomically find the first document that matches filter
and apply update
.
Parameters
• filter: FilterQuery
<T
>
• update: UpdateQuery
<T
>
• options: QueryOptions
<T
> & object
Returns
Query
<ModifyResult
<T
>, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Inherited from
Query.findOneAndUpdate
Defined in
node_modules/mongoose/types/query.d.ts:409
findOneAndUpdate(filter, update, options)
> findOneAndUpdate(filter
, update
, options
): Query
<T
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Parameters
• filter: FilterQuery
<T
>
• update: UpdateQuery
<T
>
• options: QueryOptions
<T
> & object
& ReturnsNewDoc
Returns
Query
<T
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Inherited from
Query.findOneAndUpdate
Defined in
node_modules/mongoose/types/query.d.ts:414
findOneAndUpdate(filter, update, options)
> findOneAndUpdate(filter
?, update
?, options
?): Query
<null
| T
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Parameters
• filter?: FilterQuery
<T
>
• update?: UpdateQuery
<T
>
• options?: null
| QueryOptions
<T
>
Returns
Query
<null
| T
, T
, object
, T
, "findOneAndUpdate"
, Record
<string
, never
>>
Inherited from
Query.findOneAndUpdate
Defined in
node_modules/mongoose/types/query.d.ts:419
geometry()
> geometry(object
): this
Specifies a $geometry
condition
Parameters
• object
• object.coordinates: any
[]
• object.type: string
Returns
this
Inherited from
Query.geometry
Defined in
node_modules/mongoose/types/query.d.ts:471
get()
> get(path
): any
For update operations, returns the value of a path in the update's $set
.
Useful for writing getters/setters that can work with both update operations
and save()
.
Parameters
• path: string
Returns
any
Inherited from
Query.get
Defined in
node_modules/mongoose/types/query.d.ts:478
getFilter()
> getFilter(): FilterQuery
<T
>
Returns the current query filter (also known as conditions) as a POJO.
Returns
FilterQuery
<T
>
Inherited from
Query.getFilter
Defined in
node_modules/mongoose/types/query.d.ts:481
getOptions()
> getOptions(): QueryOptions
<T
>
Gets query options.
Returns
QueryOptions
<T
>
Inherited from
Query.getOptions
Defined in
node_modules/mongoose/types/query.d.ts:484
getPopulatedPaths()
> getPopulatedPaths(): string
[]
Gets a list of paths to be populated by this query
Returns
string
[]
Inherited from
Query.getPopulatedPaths
Defined in
node_modules/mongoose/types/query.d.ts:487
getQuery()
> getQuery(): FilterQuery
<T
>
Returns the current query filter. Equivalent to getFilter()
.
Returns
FilterQuery
<T
>
Inherited from
Query.getQuery
Defined in
node_modules/mongoose/types/query.d.ts:490
getUpdate()
> getUpdate(): null
| UpdateWithAggregationPipeline
| UpdateQuery
<T
>
Returns the current update operations as a JSON object.
Returns
null
| UpdateWithAggregationPipeline
| UpdateQuery
<T
>
Inherited from
Query.getUpdate
Defined in
node_modules/mongoose/types/query.d.ts:493
gt()
gt(path, val)
> gt<K
>(path
, val
): this
Specifies a $gt
query condition. When called with one argument, the most recent path passed to where()
is used.
Type Parameters
• K = string
Parameters
• path: K
• val: any
Returns
this
Inherited from
Query.gt
Defined in
node_modules/mongoose/types/query.d.ts:496
gt(val)
> gt(val
): this
Parameters
• val: number
Returns
this
Inherited from
Query.gt
Defined in
node_modules/mongoose/types/query.d.ts:497
gte()
gte(path, val)
> gte<K
>(path
, val
): this
Specifies a $gte
query condition. When called with one argument, the most recent path passed to where()
is used.
Type Parameters
• K = string
Parameters
• path: K
• val: any
Returns
this
Inherited from
Query.gte
Defined in
node_modules/mongoose/types/query.d.ts:500
gte(val)
> gte(val
): this
Parameters
• val: number
Returns
this
Inherited from
Query.gte
Defined in
node_modules/mongoose/types/query.d.ts:501
hint()
> hint(val
): this
Sets query hints.
Parameters
• val: any
Returns
this
Inherited from
Query.hint
Defined in
node_modules/mongoose/types/query.d.ts:504
in()
in(path, val)
> in<K
>(path
, val
): this
Specifies an $in
query condition. When called with one argument, the most recent path passed to where()
is used.
Type Parameters
• K = string
Parameters
• path: K
• val: any
[]
Returns
this
Inherited from
Query.in
Defined in
node_modules/mongoose/types/query.d.ts:507
in(val)
> in(val
): this
Parameters
• val: any
[]
Returns
this
Inherited from
Query.in
Defined in
node_modules/mongoose/types/query.d.ts:508
intersects()
> intersects(arg
?): this
Declares an intersects query for geometry()
.
Parameters
• arg?: any
Returns
this
Inherited from
Query.intersects
Defined in
node_modules/mongoose/types/query.d.ts:511
j()
> j(val
): this
Requests acknowledgement that this operation has been persisted to MongoDB's on-disk journal.
Parameters
• val: null
| boolean
Returns
this
Inherited from
Query.j
Defined in
node_modules/mongoose/types/query.d.ts:514
lean()
> lean<LeanResultType
>(val
?): Query
<LeanResultType
, T
, object
, T
, "find"
, Record
<string
, never
>>
Sets the lean option.
Type Parameters
• LeanResultType = Require_id
<FlattenMaps
<T
>>
Parameters
• val?: any
Returns
Query
<LeanResultType
, T
, object
, T
, "find"
, Record
<string
, never
>>
Inherited from
Query.lean
Defined in
node_modules/mongoose/types/query.d.ts:517
limit()
> limit(val
): this
Specifies the maximum number of documents the query will return.
Parameters
• val: number
Returns
this
Inherited from
Query.limit
Defined in
node_modules/mongoose/types/query.d.ts:532
lt()
lt(path, val)
> lt<K
>(path
, val
): this
Specifies a $lt
query condition. When called with one argument, the most recent path passed to where()
is used.
Type Parameters
• K = string
Parameters
• path: K
• val: any
Returns
this
Inherited from
Query.lt
Defined in
node_modules/mongoose/types/query.d.ts:535
lt(val)
> lt(val
): this
Parameters
• val: number
Returns
this
Inherited from
Query.lt
Defined in
node_modules/mongoose/types/query.d.ts:536
lte()
lte(path, val)
> lte<K
>(path
, val
): this
Specifies a $lte
query condition. When called with one argument, the most recent path passed to where()
is used.
Type Parameters
• K = string
Parameters
• path: K
• val: any
Returns
this
Inherited from
Query.lte
Defined in
node_modules/mongoose/types/query.d.ts:539
lte(val)
> lte(val
): this
Parameters
• val: number
Returns
this
Inherited from
Query.lte
Defined in
node_modules/mongoose/types/query.d.ts:540
maxDistance()
maxDistance(path, val)
> maxDistance(path
, val
): this
Specifies an $maxDistance
query condition. When called with one argument, the most recent path passed to where()
is used.
Parameters
• path: string
• val: number
Returns
this
Inherited from
Query.maxDistance
Defined in
node_modules/mongoose/types/query.d.ts:549
maxDistance(val)
> maxDistance(val
): this
Parameters
• val: number
Returns
this
Inherited from
Query.maxDistance
Defined in
node_modules/mongoose/types/query.d.ts:550
maxTimeMS()
> maxTimeMS(ms
): this
Sets the maxTimeMS
option. This will tell the MongoDB server to abort if the query or write op
has been running for more than ms
milliseconds.
Parameters
• ms: number
Returns
this
Inherited from
Query.maxTimeMS
Defined in
node_modules/mongoose/types/query.d.ts:557
merge()
> merge(source
): this
Merges another Query or conditions object into this one.
Parameters
• source: Query
<any
, any
, object
, any
, "find"
, Record
<string
, never
>> | FilterQuery
<T
>
Returns
this
Inherited from
Query.merge
Defined in
node_modules/mongoose/types/query.d.ts:560
mod()
mod(path, val)
> mod<K
>(path
, val
): this
Specifies a $mod
condition, filters documents for documents whose path
property is a number that is equal to remainder
modulo divisor
.
Type Parameters
• K = string
Parameters
• path: K
• val: number
Returns
this
Inherited from
Query.mod
Defined in
node_modules/mongoose/types/query.d.ts:563
mod(val)
> mod(val
): this
Parameters
• val: number
[]
Returns
this
Inherited from
Query.mod
Defined in
node_modules/mongoose/types/query.d.ts:564
mongooseOptions()
> mongooseOptions(val
?): MongooseQueryOptions
<unknown
, "timestamps"
| MongooseBaseQueryOptionKeys
| "lean"
>
Getter/setter around the current mongoose-specific options for this query Below are the current Mongoose-specific options.
Parameters
• val?: MongooseQueryOptions
<unknown
, "timestamps"
| MongooseBaseQueryOptionKeys
| "lean"
>
Returns
MongooseQueryOptions
<unknown
, "timestamps"
| MongooseBaseQueryOptionKeys
| "lean"
>
Inherited from
Query.mongooseOptions
Defined in
node_modules/mongoose/types/query.d.ts:573
ne()
ne(path, val)
> ne<K
>(path
, val
): this
Specifies a $ne
query condition. When called with one argument, the most recent path passed to where()
is used.