C# Class MongoDB.Driver.Builders.DeprecatedQuery

Mostrar archivo Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Public Methods

Method Description
All ( string name ) : QueryConditionList

Tests that the named array element contains all of the values (see $all).

All ( string name, BsonArray values ) : QueryConditionList

Tests that the named array element contains all of the values (see $all).

All ( string name, IEnumerable values ) : QueryConditionList

Tests that the named array element contains all of the values (see $all).

And ( ) : QueryComplete

Tests that all the subqueries are true (see $and in newer versions of the server).

EQ ( string name, BsonValue value ) : QueryComplete

Tests that the value of the named element is equal to some value.

ElemMatch ( string name, IMongoQuery query ) : QueryConditionList

Tests that at least one item of the named array element matches a query (see $elemMatch).

Exists ( string name, bool exists ) : QueryConditionList

Tests that an element of that name does or does not exist (see $exists).

GT ( string name, BsonValue value ) : QueryConditionList

Tests that the value of the named element is greater than some value (see $gt).

GTE ( string name, BsonValue value ) : QueryConditionList

Tests that the value of the named element is greater than or equal to some value (see $gte).

In ( string name ) : QueryConditionList

Tests that the value of the named element is equal to one of a list of values (see $in).

In ( string name, BsonArray values ) : QueryConditionList

Tests that the value of the named element is equal to one of a list of values (see $in).

In ( string name, IEnumerable values ) : QueryConditionList

Tests that the value of the named element is equal to one of a list of values (see $in).

LT ( string name, BsonValue value ) : QueryConditionList

Tests that the value of the named element is less than some value (see $lt).

LTE ( string name, BsonValue value ) : QueryConditionList

Tests that the value of the named element is less than or equal to some value (see $lte).

Matches ( string name, BsonRegularExpression regex ) : QueryComplete

Tests that the value of the named element matches a regular expression (see $regex).

Mod ( string name, int modulus, int equals ) : QueryConditionList

Tests that the modulus of the value of the named element matches some value (see $mod).

NE ( string name, BsonValue value ) : QueryConditionList

Tests that the value of the named element is not equal to some value (see $ne).

Near ( string name, double x, double y ) : QueryConditionList

Tests that the value of the named element is near some location (see $near).

Near ( string name, double x, double y, double maxDistance ) : QueryConditionList

Tests that the value of the named element is near some location (see $near).

Near ( string name, double x, double y, double maxDistance, bool spherical ) : QueryConditionList

Tests that the value of the named element is near some location (see $near and $nearSphere).

Nor ( ) : QueryComplete

Tests that none of the subqueries is true (see $nor).

Not ( string name ) : QueryNot

Tests that the value of the named element does not match any of the tests that follow (see $not).

NotIn ( string name ) : QueryConditionList

Tests that the value of the named element is not equal to any of a list of values (see $nin).

NotIn ( string name, BsonArray values ) : QueryConditionList

Tests that the value of the named element is not equal to any of a list of values (see $nin).

NotIn ( string name, IEnumerable values ) : QueryConditionList

Tests that the value of the named element is not equal to any of a list of values (see $nin).

Or ( ) : QueryComplete

Tests that at least one of the subqueries is true (see $or).

Size ( string name, int size ) : QueryConditionList

Tests that the size of the named array is equal to some value (see $size).

Type ( string name, BsonType type ) : QueryConditionList

Tests that the type of the named element is equal to some type (see $type).

Where ( BsonJavaScript javaScript ) : QueryComplete

Tests that a JavaScript expression is true (see $where).

WithinCircle ( string name, double centerX, double centerY, double radius ) : QueryConditionList

Tests that the value of the named element is within a circle (see $within and $center).

WithinCircle ( string name, double centerX, double centerY, double radius, bool spherical ) : QueryConditionList

Tests that the value of the named element is within a circle (see $within and $center/$centerSphere).

WithinPolygon ( string name, double points ) : QueryConditionList

Tests that the value of the named element is within a polygon (see $within and $polygon).

WithinRectangle ( string name, double lowerLeftX, double lowerLeftY, double upperRightX, double upperRightY ) : QueryConditionList

Tests that the value of the named element is within a rectangle (see $within and $box).

Private Methods

Method Description
AddAndClause ( BsonDocument query, BsonElement clause ) : void
PromoteQueryToDollarAndForm ( BsonDocument query, BsonElement clause ) : void

Method Details

All() public static method

Tests that the named array element contains all of the values (see $all).
public static All ( string name ) : QueryConditionList
name string The name of the element to test.
return QueryConditionList

All() public static method

Tests that the named array element contains all of the values (see $all).
public static All ( string name, BsonArray values ) : QueryConditionList
name string The name of the element to test.
values BsonArray The values to compare to.
return QueryConditionList

All() public static method

Tests that the named array element contains all of the values (see $all).
public static All ( string name, IEnumerable values ) : QueryConditionList
name string The name of the element to test.
values IEnumerable The values to compare to (nulls are ignored).
return QueryConditionList

And() public static method

Tests that all the subqueries are true (see $and in newer versions of the server).
public static And ( ) : QueryComplete
return QueryComplete

EQ() public static method

Tests that the value of the named element is equal to some value.
public static EQ ( string name, BsonValue value ) : QueryComplete
name string The name of the element to test.
value BsonValue The value to compare to.
return QueryComplete

ElemMatch() public static method

Tests that at least one item of the named array element matches a query (see $elemMatch).
public static ElemMatch ( string name, IMongoQuery query ) : QueryConditionList
name string The name of the element to test.
query IMongoQuery The query to match elements with.
return QueryConditionList

Exists() public static method

Tests that an element of that name does or does not exist (see $exists).
public static Exists ( string name, bool exists ) : QueryConditionList
name string The name of the element to test.
exists bool Whether to test for the existence or absence of an element.
return QueryConditionList

GT() public static method

Tests that the value of the named element is greater than some value (see $gt).
public static GT ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
return QueryConditionList

GTE() public static method

Tests that the value of the named element is greater than or equal to some value (see $gte).
public static GTE ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
return QueryConditionList

In() public static method

Tests that the value of the named element is equal to one of a list of values (see $in).
public static In ( string name ) : QueryConditionList
name string The name of the element to test.
return QueryConditionList

In() public static method

Tests that the value of the named element is equal to one of a list of values (see $in).
public static In ( string name, BsonArray values ) : QueryConditionList
name string The name of the element to test.
values BsonArray The values to compare to.
return QueryConditionList

In() public static method

Tests that the value of the named element is equal to one of a list of values (see $in).
public static In ( string name, IEnumerable values ) : QueryConditionList
name string The name of the element to test.
values IEnumerable The values to compare to (nulls are ignored).
return QueryConditionList

LT() public static method

Tests that the value of the named element is less than some value (see $lt).
public static LT ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
return QueryConditionList

LTE() public static method

Tests that the value of the named element is less than or equal to some value (see $lte).
public static LTE ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
return QueryConditionList

Matches() public static method

Tests that the value of the named element matches a regular expression (see $regex).
public static Matches ( string name, BsonRegularExpression regex ) : QueryComplete
name string The name of the element to test.
regex BsonRegularExpression The regular expression to match against.
return QueryComplete

Mod() public static method

Tests that the modulus of the value of the named element matches some value (see $mod).
public static Mod ( string name, int modulus, int equals ) : QueryConditionList
name string The name of the element to test.
modulus int The modulus.
equals int The value to compare to.
return QueryConditionList

NE() public static method

Tests that the value of the named element is not equal to some value (see $ne).
public static NE ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
return QueryConditionList

Near() public static method

Tests that the value of the named element is near some location (see $near).
public static Near ( string name, double x, double y ) : QueryConditionList
name string The name of the element to test.
x double The x value of the origin.
y double The y value of the origin.
return QueryConditionList

Near() public static method

Tests that the value of the named element is near some location (see $near).
public static Near ( string name, double x, double y, double maxDistance ) : QueryConditionList
name string The name of the element to test.
x double The x value of the origin.
y double The y value of the origin.
maxDistance double The max distance for a document to be included in the results.
return QueryConditionList

Near() public static method

Tests that the value of the named element is near some location (see $near and $nearSphere).
public static Near ( string name, double x, double y, double maxDistance, bool spherical ) : QueryConditionList
name string The name of the element to test.
x double The x value of the origin.
y double The y value of the origin.
maxDistance double The max distance for a document to be included in the results.
spherical bool Whether to do a spherical search.
return QueryConditionList

Nor() public static method

Tests that none of the subqueries is true (see $nor).
public static Nor ( ) : QueryComplete
return QueryComplete

Not() public static method

Tests that the value of the named element does not match any of the tests that follow (see $not).
public static Not ( string name ) : QueryNot
name string The name of the element to test.
return QueryNot

NotIn() public static method

Tests that the value of the named element is not equal to any of a list of values (see $nin).
public static NotIn ( string name ) : QueryConditionList
name string The name of the element to test.
return QueryConditionList

NotIn() public static method

Tests that the value of the named element is not equal to any of a list of values (see $nin).
public static NotIn ( string name, BsonArray values ) : QueryConditionList
name string The name of the element to test.
values BsonArray The values to compare to.
return QueryConditionList

NotIn() public static method

Tests that the value of the named element is not equal to any of a list of values (see $nin).
public static NotIn ( string name, IEnumerable values ) : QueryConditionList
name string The name of the element to test.
values IEnumerable The values to compare to (nulls are ignored).
return QueryConditionList

Or() public static method

Tests that at least one of the subqueries is true (see $or).
public static Or ( ) : QueryComplete
return QueryComplete

Size() public static method

Tests that the size of the named array is equal to some value (see $size).
public static Size ( string name, int size ) : QueryConditionList
name string The name of the element to test.
size int The size to compare to.
return QueryConditionList

Type() public static method

Tests that the type of the named element is equal to some type (see $type).
public static Type ( string name, BsonType type ) : QueryConditionList
name string The name of the element to test.
type BsonType The type to compare to.
return QueryConditionList

Where() public static method

Tests that a JavaScript expression is true (see $where).
public static Where ( BsonJavaScript javaScript ) : QueryComplete
javaScript BsonJavaScript The where clause.
return QueryComplete

WithinCircle() public static method

Tests that the value of the named element is within a circle (see $within and $center).
public static WithinCircle ( string name, double centerX, double centerY, double radius ) : QueryConditionList
name string The name of the element to test.
centerX double The x coordinate of the origin.
centerY double The y coordinate of the origin.
radius double The radius of the circle.
return QueryConditionList

WithinCircle() public static method

Tests that the value of the named element is within a circle (see $within and $center/$centerSphere).
public static WithinCircle ( string name, double centerX, double centerY, double radius, bool spherical ) : QueryConditionList
name string The name of the element to test.
centerX double The x coordinate of the origin.
centerY double The y coordinate of the origin.
radius double The radius of the circle.
spherical bool Whether to do a spherical search.
return QueryConditionList

WithinPolygon() public static method

Tests that the value of the named element is within a polygon (see $within and $polygon).
public static WithinPolygon ( string name, double points ) : QueryConditionList
name string The name of the element to test.
points double An array of points that defines the polygon (the second dimension must be of length 2).
return QueryConditionList

WithinRectangle() public static method

Tests that the value of the named element is within a rectangle (see $within and $box).
public static WithinRectangle ( string name, double lowerLeftX, double lowerLeftY, double upperRightX, double upperRightY ) : QueryConditionList
name string The name of the element to test.
lowerLeftX double The x coordinate of the lower left corner.
lowerLeftY double The y coordinate of the lower left corner.
upperRightX double The x coordinate of the upper right corner.
upperRightY double The y coordinate of the upper right corner.
return QueryConditionList