C# Class CSMongo.Query.MongoQuery

Handles building a query and generating records
Inheritance: MongoQueryBase
Afficher le fichier Open project: hugoware/CSMongo

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
_SendUpdate ( string type, UpdateOptionTypes options, BsonDocument changes ) : void

Method Details

All() public méthode

Finds fields that match all value within the record
public All ( string field ) : MongoQuery
field string
Résultat MongoQuery

All() public méthode

Finds fields that match all value within the record
public All ( string field, IEnumerable values ) : MongoQuery
field string
values IEnumerable
Résultat MongoQuery

AppendParameter() public méthode

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
Résultat MongoQuery

Count() public méthode

Determines the total count of records matching this query
public Count ( ) : long
Résultat long

Delete() public méthode

Performs a selection of all fields matching the query
public Delete ( ) : void
Résultat void

EqualTo() public méthode

Finds all records that are equal to the value provided
public EqualTo ( string field, object value ) : MongoQuery
field string
value object
Résultat MongoQuery

Exists() public méthode

Finds records that the requested field exists in
public Exists ( string field ) : MongoQuery
field string
Résultat MongoQuery

FindById() public méthode

Finds a record based on the Oid value
public FindById ( MongoOid id ) : MongoQuery
id MongoOid
Résultat MongoQuery

FindById() public méthode

Finds a record based on the Oid value
public FindById ( byte id ) : MongoQuery
id byte
Résultat MongoQuery

FindById() public méthode

Finds a record based on the Oid value
public FindById ( string id ) : MongoQuery
id string
Résultat MongoQuery

Greater() public méthode

Finds all records greater than the provided value
public Greater ( string field, object value ) : MongoQuery
field string
value object
Résultat MongoQuery

GreaterOrEqual() public méthode

Finds all records greater than or equal to the provided value
public GreaterOrEqual ( string field, object value ) : MongoQuery
field string
value object
Résultat MongoQuery

In() public méthode

Finds fields that match any value within the record
public In ( string field ) : MongoQuery
field string
Résultat MongoQuery

In() public méthode

Finds fields that match any value within the record
public In ( string field, IEnumerable values ) : MongoQuery
field string
values IEnumerable
Résultat MongoQuery

Increment() public méthode

Increments each of the fields provided by one
public Increment ( ) : void
Résultat void

Increment() public méthode

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
Résultat void

Increment() public méthode

Increments each of the fields by the number provides - first converting the value to an integer
public Increment ( object parameters ) : void
parameters object
Résultat void

Less() public méthode

Finds all records less than the provided value
public Less ( string field, object value ) : MongoQuery
field string
value object
Résultat MongoQuery

LessOrEqual() public méthode

Finds all records less than or equal to the provided value
public LessOrEqual ( string field, object value ) : MongoQuery
field string
value object
Résultat MongoQuery

Match() public méthode

Finds all records that match the provided expression
public Match ( string field, Regex expression ) : MongoQuery
field string
expression System.Text.RegularExpressions.Regex
Résultat MongoQuery

Match() public méthode

Finds all records that match the provided expression
public Match ( string field, string expression ) : MongoQuery
field string
expression string
Résultat MongoQuery

Match() public méthode

Finds all records that match the provided expression
public Match ( string field, string expression, RegexOptions options ) : MongoQuery
field string
expression string
options RegexOptions
Résultat MongoQuery

Mod() public méthode

Performs a modulo comparison (field % value == 1)
public Mod ( string field, int value ) : MongoQuery
field string
value int
Résultat MongoQuery

Mod() public méthode

Performs a modulo comparison (field % value == compare)
public Mod ( string field, int value, int compare ) : MongoQuery
field string
value int
compare int
Résultat MongoQuery

MongoQuery() public méthode

Creates a new query for this database
public MongoQuery ( MongoCollection collection ) : System
collection MongoCollection
Résultat System

MongoQuery() public méthode

Creates a new query for this database
public MongoQuery ( MongoDatabase database, string collection ) : System
database MongoDatabase
collection string
Résultat System

NotEqualTo() public méthode

Finds all records that are not equal to the value provided
public NotEqualTo ( string field, object value ) : MongoQuery
field string
value object
Résultat MongoQuery

NotExists() public méthode

Finds records that the requested field does not exist in
public NotExists ( string field ) : MongoQuery
field string
Résultat MongoQuery

NotIn() public méthode

Finds fields that haven't any matches within the array
public NotIn ( string field ) : MongoQuery
field string
Résultat MongoQuery

NotIn() public méthode

Finds fields that haven't any matches within the collection
public NotIn ( string field, IEnumerable values ) : MongoQuery
field string
values IEnumerable
Résultat MongoQuery

Select() public méthode

Selects the records from the database that matches this query
public Select ( ) : IEnumerable
Résultat IEnumerable

Select() public méthode

Selects the records from the database that matches this query
public Select ( QueryOptionTypes options ) : IEnumerable
options QueryOptionTypes
Résultat IEnumerable

Select() public méthode

Selects the records from the database that matches this query
public Select ( int skip, int take ) : IEnumerable
skip int
take int
Résultat IEnumerable

Select() public méthode

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
Résultat IEnumerable

SelectOne() public méthode

Selects only one document with the provided parameters
public SelectOne ( ) : MongoDocument
Résultat MongoDocument

SelectOne() public méthode

Selects only one document with the provided parameters
public SelectOne ( QueryOptionTypes options ) : MongoDocument
options QueryOptionTypes
Résultat MongoDocument

SelectOne() public méthode

Selects only one document with the provided parameters
public SelectOne ( int skip ) : MongoDocument
skip int
Résultat MongoDocument

SelectOne() public méthode

Selects only one document with the provided parameters
public SelectOne ( int skip, QueryOptionTypes options ) : MongoDocument
skip int
options QueryOptionTypes
Résultat MongoDocument

Set() public méthode

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
Résultat void

Set() public méthode

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
Résultat void

Size() public méthode

Finds fields that match all value within the record
public Size ( string field, int size ) : MongoQuery
field string
size int
Résultat MongoQuery

Unset() public méthode

Removes all matching fields from each document in the query
public Unset ( ) : void
Résultat void

Where() public méthode

Writes a manual function to persom a comparison on the server
public Where ( string script ) : MongoQuery
script string
Résultat MongoQuery

Where() public méthode

Writes a manual function to perform a comparison on the server
public Where ( string script, bool wrapWithFunction ) : MongoQuery
script string
wrapWithFunction bool
Résultat MongoQuery