FindQueryBuilder
Value members
Concrete methods
Sets the collation options
Sets the collation options
A null value represents the server default.
- Value Params
- collation
the collation options to use
- Returns
FindQueryBuilder
- Since
1.3
Sets the comment to the query. A null value means no comment is set.
Sets the comment to the query. A null value means no comment is set.
- Value Params
- comment
the comment
- Returns
FindQueryBuilder
- Since
1.6
Explain the execution plan for this operation with the server's default verbosity level
Explain the execution plan for this operation with the server's default verbosity level
- Returns
the execution plan
- Since
4.2
Explain the execution plan for this operation with the given verbosity level
Explain the execution plan for this operation with the given verbosity level
- Value Params
- verbosity
the verbosity of the explanation
- Returns
the execution plan
- Since
4.2
Sets the query filter to apply to the query.
Sets the query filter to apply to the query.
- Value Params
- filter
the filter
- Returns
FindQueryBuilder
Sets the hint for which index to use. A null value means no hint is set.
Sets the hint for which index to use. A null value means no hint is set.
- Value Params
- index
the name of the index which should be used for the operation
- Returns
FindQueryBuilder
- Since
1.13
Sets the hint for which index to use. A null value means no hint is set.
Sets the hint for which index to use. A null value means no hint is set.
- Value Params
- hint
the hint
- Returns
FindQueryBuilder
- Since
1.6
Sets the limit to apply.
Sets the limit to apply.
- Value Params
- limit
the limit
- Returns
FindQueryBuilder
Sets the exclusive upper bound for a specific index. A null value means no max is set.
Sets the exclusive upper bound for a specific index. A null value means no max is set.
- Value Params
- max
the max
- Returns
this
- Since
1.6
The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. This only applies to a TAILABLE_AWAIT cursor. When the cursor is not a TAILABLE_AWAIT cursor, this option is ignored.
The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. This only applies to a TAILABLE_AWAIT cursor. When the cursor is not a TAILABLE_AWAIT cursor, this option is ignored.
On servers >= 3.2, this option will be specified on the getMore command as "maxTimeMS". The default is no value: no "maxTimeMS" is sent to the server with the getMore command.
On servers < 3.2, this option is ignored, and indicates that the driver should respect the server's default value
A zero value will be ignored.
- Value Params
- duration
the max await time
- Returns
the maximum await execution time in the given time unit
Sets the maximum execution time on the server for this operation.
Sets the maximum execution time on the server for this operation.
- Value Params
- duration
the max time
- Returns
FindQueryBuilder
Sets the minimum inclusive lower bound for a specific index. A null value means no max is set.
Sets the minimum inclusive lower bound for a specific index. A null value means no max is set.
- Value Params
- min
the min
- Returns
this
- Since
1.6
Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
- Value Params
- partial
if partial results for sharded clusters is enabled
- Returns
FindQueryBuilder
Sets a document describing the fields to return for all matching documents.
Sets a document describing the fields to return for all matching documents.
- Value Params
- projection
the project document, which may be null.
- Returns
FindQueryBuilder
Sets the returnKey. If true the find operation will return only the index keys in the resulting documents.
Sets the returnKey. If true the find operation will return only the index keys in the resulting documents.
- Value Params
- returnKey
the returnKey
- Returns
FindQueryBuilder
- Since
1.6
Sets the showRecordId. Set to true to add a field $recordId to the returned documents.
Sets the showRecordId. Set to true to add a field $recordId to the returned documents.
- Value Params
- showRecordId
the showRecordId
- Returns
FindQueryBuilder
- Since
1.6
Sets the number of documents to skip.
Sets the number of documents to skip.
- Value Params
- skip
the number of documents to skip
- Returns
FindQueryBuilder