Click or drag to resize

Query Class

A builder for creating queries.
Inheritance Hierarchy
SystemObject
  MongoDB.Driver.BuildersQuery

Namespace:  MongoDB.Driver.Builders
Assembly:  MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.15.0+f503bf610759c13f78cff9a3c01e91453185d2ed
Syntax
public static class Query

The Query type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberEmpty
Gets an empty query.
Public propertyStatic memberNull
Gets a null value with a type of IMongoQuery.
Top
Methods
  NameDescription
Public methodStatic memberAll
Tests that the named array element contains all of the values (see $all).
Public methodStatic memberAnd(IEnumerableIMongoQuery)
Tests that all the queries are true (see $and in newer versions of the server).
Public methodStatic memberAnd(IMongoQuery)
Tests that all the queries are true (see $and in newer versions of the server).
Public methodStatic memberBitsAllClear
Tests that the value of the named element has all of the specified bits clear.
Public methodStatic memberBitsAllSet
Tests that the value of the named element has all of the specified bits set.
Public methodStatic memberBitsAnyClear
Tests that the value of the named element has any of the specified bits clear.
Public methodStatic memberBitsAnySet
Tests that the value of the named element has any of the specified bits set.
Public methodStatic memberCreate(BsonDocument)
Creates a query manually.
Public methodStatic memberCreate(String, BsonValue)
Creates a query manually.
Public methodStatic memberElemMatch
Tests that at least one item of the named array element matches a query (see $elemMatch).
Public methodStatic memberEQ
Tests that the value of the named element is equal to some value.
Public methodStatic memberExists
Tests that an element of that name exists (see $exists).
Public methodStatic memberGeoIntersectsTCoordinates
Tests that a location element specified by name intersects with the geometry (see $geoIntersects).
Public methodStatic memberGT
Tests that the value of the named element is greater than some value (see $gt).
Public methodStatic memberGTE
Tests that the value of the named element is greater than or equal to some value (see $gte).
Public methodStatic memberIn
Tests that the value of the named element is equal to one of a list of values (see $in).
Public methodStatic memberLT
Tests that the value of the named element is less than some value (see $lt).
Public methodStatic memberLTE
Tests that the value of the named element is less than or equal to some value (see $lte).
Public methodStatic memberMatches
Tests that the value of the named element matches a regular expression (see $regex).
Public methodStatic memberMod
Tests that the modulus of the value of the named element matches some value (see $mod).
Public methodStatic memberNE
Tests that an element does not equal the value (see $ne).
Public methodStatic memberNear(String, Double, Double)
Tests that the value of the named element is near some location (see $near).
Public methodStatic memberNear(String, Double, Double, Double)
Tests that the value of the named element is near some location (see $near).
Public methodStatic memberNear(String, Double, Double, Double, Boolean)
Tests that the value of the named element is near some location (see $near).
Public methodStatic memberNearTCoordinates(String, GeoJsonPointTCoordinates)
Tests that the value of the named element is near a point (see $near).
Public methodStatic memberNearTCoordinates(String, GeoJsonPointTCoordinates, Double)
Tests that the value of the named element is near some location (see $near).
Public methodStatic memberNearTCoordinates(String, GeoJsonPointTCoordinates, Double, Boolean)
Tests that the value of the named element is near some location (see $near).
Public methodStatic memberNot
Tests that the inverse of the query is true (see $not).
Public methodStatic memberNotExists
Tests that an element of that name does not exist (see $exists).
Public methodStatic memberNotIn
Tests that the value of the named element is not equal to any item in a list of values (see $nin).
Public methodStatic memberOr(IEnumerableIMongoQuery)
Tests that at least one of the subqueries is true (see $or).
Public methodStatic memberOr(IMongoQuery)
Tests that at least one of the subqueries is true (see $or).
Public methodStatic memberSize
Tests that the size of the named array is equal to some value (see $size).
Public methodStatic memberSizeGreaterThan
Tests that the size of the named array is greater than some value.
Public methodStatic memberSizeGreaterThanOrEqual
Tests that the size of the named array is greater than or equal to some value.
Public methodStatic memberSizeLessThan
Tests that the size of the named array is less than some value.
Public methodStatic memberSizeLessThanOrEqual
Tests that the size of the named array is less than or equal to some value.
Public methodStatic memberText(String)
Generate a text search query that tests whether the given search string is present.
Public methodStatic memberText(String, TextSearchOptions)
Generate a text search query that tests whether the given search string is present using the specified language's rules. Specifies use of language appropriate stop words, stemming rules etc.
Public methodStatic memberText(String, String)
Generate a text search query that tests whether the given search string is present using the specified language's rules. Specifies use of language appropriate stop words, stemming rules etc.
Public methodStatic memberType(String, BsonType)
Tests that the type of the named element is equal to some type (see $type).
Public methodStatic memberType(String, String)
Tests that the type of the named element is equal to some type (see $type).
Public methodStatic memberWhere
Tests that a JavaScript expression is true (see $where).
Public methodStatic memberWithinTCoordinates
Tests that the value of the named element is within the specified geometry (see $within).
Public methodStatic memberWithinCircle(String, Double, Double, Double)
Tests that the value of the named element is within a circle (see $within and $center).
Public methodStatic memberWithinCircle(String, Double, Double, Double, Boolean)
Tests that the value of the named element is within a circle (see $within and $center).
Public methodStatic memberWithinPolygon
Tests that the value of the named element is within a polygon (see $within and $polygon).
Public methodStatic memberWithinRectangle
Tests that the value of the named element is within a rectangle (see $within and $box).
Top
See Also