C# Класс MongoDB.Driver.Builders.Query

A builder for creating queries.
Показать файл Открыть проект

Открытые методы

Метод Описание
All ( string name ) : QueryConditionList

Adds a $all test to the query.

All ( string name, IEnumerable values ) : QueryConditionList

Adds a $all test to the query.

And ( ) : QueryComplete

Combines subqueries with an and operator.

EQ ( string name, BsonValue value ) : QueryComplete

Adds an equality test to the query.

ElemMatch ( string name, IMongoQuery query ) : QueryConditionList

Adds an $elemMatch test to the query.

Exists ( string name, bool exists ) : QueryConditionList

Adds a $exist test to the query.

GT ( string name, BsonValue value ) : QueryConditionList

Adds a $gt test to the query.

GTE ( string name, BsonValue value ) : QueryConditionList

Adds a $gte test to the query.

In ( string name ) : QueryConditionList

Adds a $in test to the query.

In ( string name, IEnumerable values ) : QueryConditionList

Adds a $in test to the query.

LT ( string name, BsonValue value ) : QueryConditionList

Adds a $lt test to the query.

LTE ( string name, BsonValue value ) : QueryConditionList

Adds a $lte test to the query.

Matches ( string name, BsonRegularExpression regex ) : QueryComplete

Adds a regular expression test to the query.

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

Adds a $mod test to the query.

NE ( string name, BsonValue value ) : QueryConditionList

Adds a $ne test to the query.

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

Adds a $near test to the query.

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

Adds a $near test to the query.

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

Adds a $near or $nearSphere test to the query.

Nor ( ) : QueryComplete

Combines subqueries with a nor operator.

Not ( string name ) : QueryNot

Adds a $not test to the query.

NotIn ( string name ) : QueryConditionList

Adds a $nin test to the query.

NotIn ( string name, IEnumerable values ) : QueryConditionList

Adds a $nin test to the query.

Or ( ) : QueryComplete

Combines subqueries with an or operator.

Size ( string name, int size ) : QueryConditionList

Adds a $size test to the query.

Type ( string name, BsonType type ) : QueryConditionList

Adds a $type test to the query.

Where ( BsonJavaScript javaScript ) : QueryComplete

Adds a $where test to the query.

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

Adds a $within/$center test to the query.

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

Adds a $within/$center or $within/$centerSphere test to the query.

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

Adds a $within/$box test to the query.

Описание методов

All() публичный статический Метод

Adds a $all test to the query.
public static All ( string name ) : QueryConditionList
name string The name of the element to test.
Результат QueryConditionList

All() публичный статический Метод

Adds a $all test to the query.
public static All ( string name, IEnumerable values ) : QueryConditionList
name string The name of the element to test.
values IEnumerable A BsonArray of values.
Результат QueryConditionList

And() публичный статический Метод

Combines subqueries with an and operator.
public static And ( ) : QueryComplete
Результат QueryComplete

EQ() публичный статический Метод

Adds an equality test to the query.
public static EQ ( string name, BsonValue value ) : QueryComplete
name string The name of the element to test.
value BsonValue The value to compare to.
Результат QueryComplete

ElemMatch() публичный статический Метод

Adds an $elemMatch test to the query.
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.
Результат QueryConditionList

Exists() публичный статический Метод

Adds a $exist test to the query.
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.
Результат QueryConditionList

GT() публичный статический Метод

Adds a $gt test to the query.
public static GT ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
Результат QueryConditionList

GTE() публичный статический Метод

Adds a $gte test to the query.
public static GTE ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
Результат QueryConditionList

In() публичный статический Метод

Adds a $in test to the query.
public static In ( string name ) : QueryConditionList
name string The name of the element to test.
Результат QueryConditionList

In() публичный статический Метод

Adds a $in test to the query.
public static In ( string name, IEnumerable values ) : QueryConditionList
name string The name of the element to test.
values IEnumerable A BsonArray of values.
Результат QueryConditionList

LT() публичный статический Метод

Adds a $lt test to the query.
public static LT ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
Результат QueryConditionList

LTE() публичный статический Метод

Adds a $lte test to the query.
public static LTE ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
Результат QueryConditionList

Matches() публичный статический Метод

Adds a regular expression test to the query.
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.
Результат QueryComplete

Mod() публичный статический Метод

Adds a $mod test to the query.
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.
Результат QueryConditionList

NE() публичный статический Метод

Adds a $ne test to the query.
public static NE ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
Результат QueryConditionList

Near() публичный статический Метод

Adds a $near test to the query.
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.
Результат QueryConditionList

Near() публичный статический Метод

Adds a $near test to the query.
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.
Результат QueryConditionList

Near() публичный статический Метод

Adds a $near or $nearSphere test to the query.
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.
Результат QueryConditionList

Nor() публичный статический Метод

Combines subqueries with a nor operator.
public static Nor ( ) : QueryComplete
Результат QueryComplete

Not() публичный статический Метод

Adds a $not test to the query.
public static Not ( string name ) : QueryNot
name string The name of the element to test.
Результат QueryNot

NotIn() публичный статический Метод

Adds a $nin test to the query.
public static NotIn ( string name ) : QueryConditionList
name string The name of the element to test.
Результат QueryConditionList

NotIn() публичный статический Метод

Adds a $nin test to the query.
public static NotIn ( string name, IEnumerable values ) : QueryConditionList
name string The name of the element to test.
values IEnumerable A BsonArray of values.
Результат QueryConditionList

Or() публичный статический Метод

Combines subqueries with an or operator.
public static Or ( ) : QueryComplete
Результат QueryComplete

Size() публичный статический Метод

Adds a $size test to the query.
public static Size ( string name, int size ) : QueryConditionList
name string The name of the array element to test.
size int The size of the array.
Результат QueryConditionList

Type() публичный статический Метод

Adds a $type test to the query.
public static Type ( string name, BsonType type ) : QueryConditionList
name string The name of the element to test.
type BsonType The type.
Результат QueryConditionList

Where() публичный статический Метод

Adds a $where test to the query.
public static Where ( BsonJavaScript javaScript ) : QueryComplete
javaScript BsonJavaScript The where clause.
Результат QueryComplete

WithinCircle() публичный статический Метод

Adds a $within/$center test to the query.
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.
Результат QueryConditionList

WithinCircle() публичный статический Метод

Adds a $within/$center or $within/$centerSphere test to the query.
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.
Результат QueryConditionList

WithinRectangle() публичный статический Метод

Adds a $within/$box test to the query.
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.
Результат QueryConditionList