C# Класс CSMongo.Query.MongoQuery

Handles building a query and generating records
Наследование: MongoQueryBase
Показать файл Открыть проект

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

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

Finds fields that match all value within the record

All ( string field, IEnumerable values ) : MongoQuery

Finds fields that match all value within the record

AppendParameter ( string field, string modifier, object value ) : MongoQuery

Allows you to append a query option using the Mongo syntax

Count ( ) : long

Determines the total count of records matching this query

Delete ( ) : void

Performs a selection of all fields matching the query

EqualTo ( string field, object value ) : MongoQuery

Finds all records that are equal to the value provided

Exists ( string field ) : MongoQuery

Finds records that the requested field exists in

FindById ( MongoOid id ) : MongoQuery

Finds a record based on the Oid value

FindById ( byte id ) : MongoQuery

Finds a record based on the Oid value

FindById ( string id ) : MongoQuery

Finds a record based on the Oid value

Greater ( string field, object value ) : MongoQuery

Finds all records greater than the provided value

GreaterOrEqual ( string field, object value ) : MongoQuery

Finds all records greater than or equal to the provided value

In ( string field ) : MongoQuery

Finds fields that match any value within the record

In ( string field, IEnumerable values ) : MongoQuery

Finds fields that match any value within the record

Increment ( ) : void

Increments each of the fields provided by one

Increment ( BsonDocument document ) : void

Increments each of the fields by the number provides - first converting the value to an integer

Increment ( object parameters ) : void

Increments each of the fields by the number provides - first converting the value to an integer

Less ( string field, object value ) : MongoQuery

Finds all records less than the provided value

LessOrEqual ( string field, object value ) : MongoQuery

Finds all records less than or equal to the provided value

Match ( string field, Regex expression ) : MongoQuery

Finds all records that match the provided expression

Match ( string field, string expression ) : MongoQuery

Finds all records that match the provided expression

Match ( string field, string expression, RegexOptions options ) : MongoQuery

Finds all records that match the provided expression

Mod ( string field, int value ) : MongoQuery

Performs a modulo comparison (field % value == 1)

Mod ( string field, int value, int compare ) : MongoQuery

Performs a modulo comparison (field % value == compare)

MongoQuery ( MongoCollection collection ) : System

Creates a new query for this database

MongoQuery ( MongoDatabase database, string collection ) : System

Creates a new query for this database

NotEqualTo ( string field, object value ) : MongoQuery

Finds all records that are not equal to the value provided

NotExists ( string field ) : MongoQuery

Finds records that the requested field does not exist in

NotIn ( string field ) : MongoQuery

Finds fields that haven't any matches within the array

NotIn ( string field, IEnumerable values ) : MongoQuery

Finds fields that haven't any matches within the collection

Select ( ) : IEnumerable

Selects the records from the database that matches this query

Select ( QueryOptionTypes options ) : IEnumerable

Selects the records from the database that matches this query

Select ( int skip, int take ) : IEnumerable

Selects the records from the database that matches this query

Select ( int skip, int take, QueryOptionTypes options ) : IEnumerable

Selects the records from the database that matches this query

SelectOne ( ) : MongoDocument

Selects only one document with the provided parameters

SelectOne ( QueryOptionTypes options ) : MongoDocument

Selects only one document with the provided parameters

SelectOne ( int skip ) : MongoDocument

Selects only one document with the provided parameters

SelectOne ( int skip, QueryOptionTypes options ) : MongoDocument

Selects only one document with the provided parameters

Set ( BsonDocument document ) : void

Updates all matching records with the values on the provided BsonDocument or adds the new item to object entirely

Set ( object changes ) : void

Updates all matching records with the values on the provided object or adds the new item to object entirely

Size ( string field, int size ) : MongoQuery

Finds fields that match all value within the record

Unset ( ) : void

Removes all matching fields from each document in the query

Where ( string script ) : MongoQuery

Writes a manual function to persom a comparison on the server

Where ( string script, bool wrapWithFunction ) : MongoQuery

Writes a manual function to perform a comparison on the server

Приватные методы

Метод Описание
_SendUpdate ( string type, UpdateOptionTypes options, BsonDocument changes ) : void

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

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

Finds fields that match all value within the record
public All ( string field ) : MongoQuery
field string
Результат MongoQuery

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

Finds fields that match all value within the record
public All ( string field, IEnumerable values ) : MongoQuery
field string
values IEnumerable
Результат MongoQuery

AppendParameter() публичный Метод

Allows you to append a query option using the Mongo syntax
public AppendParameter ( string field, string modifier, object value ) : MongoQuery
field string
modifier string
value object
Результат MongoQuery

Count() публичный Метод

Determines the total count of records matching this query
public Count ( ) : long
Результат long

Delete() публичный Метод

Performs a selection of all fields matching the query
public Delete ( ) : void
Результат void

EqualTo() публичный Метод

Finds all records that are equal to the value provided
public EqualTo ( string field, object value ) : MongoQuery
field string
value object
Результат MongoQuery

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

Finds records that the requested field exists in
public Exists ( string field ) : MongoQuery
field string
Результат MongoQuery

FindById() публичный Метод

Finds a record based on the Oid value
public FindById ( MongoOid id ) : MongoQuery
id MongoOid
Результат MongoQuery

FindById() публичный Метод

Finds a record based on the Oid value
public FindById ( byte id ) : MongoQuery
id byte
Результат MongoQuery

FindById() публичный Метод

Finds a record based on the Oid value
public FindById ( string id ) : MongoQuery
id string
Результат MongoQuery

Greater() публичный Метод

Finds all records greater than the provided value
public Greater ( string field, object value ) : MongoQuery
field string
value object
Результат MongoQuery

GreaterOrEqual() публичный Метод

Finds all records greater than or equal to the provided value
public GreaterOrEqual ( string field, object value ) : MongoQuery
field string
value object
Результат MongoQuery

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

Finds fields that match any value within the record
public In ( string field ) : MongoQuery
field string
Результат MongoQuery

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

Finds fields that match any value within the record
public In ( string field, IEnumerable values ) : MongoQuery
field string
values IEnumerable
Результат MongoQuery

Increment() публичный Метод

Increments each of the fields provided by one
public Increment ( ) : void
Результат void

Increment() публичный Метод

Increments each of the fields by the number provides - first converting the value to an integer
public Increment ( BsonDocument document ) : void
document CSMongo.Bson.BsonDocument
Результат void

Increment() публичный Метод

Increments each of the fields by the number provides - first converting the value to an integer
public Increment ( object parameters ) : void
parameters object
Результат void

Less() публичный Метод

Finds all records less than the provided value
public Less ( string field, object value ) : MongoQuery
field string
value object
Результат MongoQuery

LessOrEqual() публичный Метод

Finds all records less than or equal to the provided value
public LessOrEqual ( string field, object value ) : MongoQuery
field string
value object
Результат MongoQuery

Match() публичный Метод

Finds all records that match the provided expression
public Match ( string field, Regex expression ) : MongoQuery
field string
expression System.Text.RegularExpressions.Regex
Результат MongoQuery

Match() публичный Метод

Finds all records that match the provided expression
public Match ( string field, string expression ) : MongoQuery
field string
expression string
Результат MongoQuery

Match() публичный Метод

Finds all records that match the provided expression
public Match ( string field, string expression, RegexOptions options ) : MongoQuery
field string
expression string
options RegexOptions
Результат MongoQuery

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

Performs a modulo comparison (field % value == 1)
public Mod ( string field, int value ) : MongoQuery
field string
value int
Результат MongoQuery

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

Performs a modulo comparison (field % value == compare)
public Mod ( string field, int value, int compare ) : MongoQuery
field string
value int
compare int
Результат MongoQuery

MongoQuery() публичный Метод

Creates a new query for this database
public MongoQuery ( MongoCollection collection ) : System
collection MongoCollection
Результат System

MongoQuery() публичный Метод

Creates a new query for this database
public MongoQuery ( MongoDatabase database, string collection ) : System
database MongoDatabase
collection string
Результат System

NotEqualTo() публичный Метод

Finds all records that are not equal to the value provided
public NotEqualTo ( string field, object value ) : MongoQuery
field string
value object
Результат MongoQuery

NotExists() публичный Метод

Finds records that the requested field does not exist in
public NotExists ( string field ) : MongoQuery
field string
Результат MongoQuery

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

Finds fields that haven't any matches within the array
public NotIn ( string field ) : MongoQuery
field string
Результат MongoQuery

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

Finds fields that haven't any matches within the collection
public NotIn ( string field, IEnumerable values ) : MongoQuery
field string
values IEnumerable
Результат MongoQuery

Select() публичный Метод

Selects the records from the database that matches this query
public Select ( ) : IEnumerable
Результат IEnumerable

Select() публичный Метод

Selects the records from the database that matches this query
public Select ( QueryOptionTypes options ) : IEnumerable
options QueryOptionTypes
Результат IEnumerable

Select() публичный Метод

Selects the records from the database that matches this query
public Select ( int skip, int take ) : IEnumerable
skip int
take int
Результат IEnumerable

Select() публичный Метод

Selects the records from the database that matches this query
public Select ( int skip, int take, QueryOptionTypes options ) : IEnumerable
skip int
take int
options QueryOptionTypes
Результат IEnumerable

SelectOne() публичный Метод

Selects only one document with the provided parameters
public SelectOne ( ) : MongoDocument
Результат MongoDocument

SelectOne() публичный Метод

Selects only one document with the provided parameters
public SelectOne ( QueryOptionTypes options ) : MongoDocument
options QueryOptionTypes
Результат MongoDocument

SelectOne() публичный Метод

Selects only one document with the provided parameters
public SelectOne ( int skip ) : MongoDocument
skip int
Результат MongoDocument

SelectOne() публичный Метод

Selects only one document with the provided parameters
public SelectOne ( int skip, QueryOptionTypes options ) : MongoDocument
skip int
options QueryOptionTypes
Результат MongoDocument

Set() публичный Метод

Updates all matching records with the values on the provided BsonDocument or adds the new item to object entirely
public Set ( BsonDocument document ) : void
document CSMongo.Bson.BsonDocument
Результат void

Set() публичный Метод

Updates all matching records with the values on the provided object or adds the new item to object entirely
public Set ( object changes ) : void
changes object
Результат void

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

Finds fields that match all value within the record
public Size ( string field, int size ) : MongoQuery
field string
size int
Результат MongoQuery

Unset() публичный Метод

Removes all matching fields from each document in the query
public Unset ( ) : void
Результат void

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

Writes a manual function to persom a comparison on the server
public Where ( string script ) : MongoQuery
script string
Результат MongoQuery

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

Writes a manual function to perform a comparison on the server
public Where ( string script, bool wrapWithFunction ) : MongoQuery
script string
wrapWithFunction bool
Результат MongoQuery