@@ -49,7 +49,7 @@ public MongoQuery(MongoDatabase database, string collection)
49
49
/// <summary>
50
50
/// Allows you to append a query option using the Mongo syntax
51
51
/// </summary>
52
- public MongoQuery Append ( string field , string modifier , object value ) {
52
+ public MongoQuery AppendParameter ( string field , string modifier , object value ) {
53
53
54
54
//make sure there is a field available
55
55
if ( ! ( this . _Parameters [ field ] is BsonDocument ) ) {
@@ -99,7 +99,7 @@ public MongoQuery Where(string script, bool wrapWithFunction) {
99
99
/// Finds all records that match the provided expression
100
100
/// </summary>
101
101
public MongoQuery Match ( string field , Regex expression ) {
102
- return this . Append ( field , null , expression ) ;
102
+ return this . AppendParameter ( field , null , expression ) ;
103
103
}
104
104
105
105
/// <summary>
@@ -127,7 +127,7 @@ public MongoQuery EqualTo(string field, object value) {
127
127
}
128
128
129
129
//otherwise, just do the default step
130
- return this . Append ( field , null , value ) ;
130
+ return this . AppendParameter ( field , null , value ) ;
131
131
132
132
}
133
133
@@ -161,49 +161,49 @@ public MongoQuery FindById(MongoOid id) {
161
161
/// Finds all records that are not equal to the value provided
162
162
/// </summary>
163
163
public MongoQuery NotEqualTo ( string field , object value ) {
164
- return this . Append ( field , "$ne" , value ) ;
164
+ return this . AppendParameter ( field , "$ne" , value ) ;
165
165
}
166
166
167
167
/// <summary>
168
168
/// Finds all records greater than or equal to the provided value
169
169
/// </summary>
170
170
public MongoQuery GreaterOrEqual ( string field , object value ) {
171
- return this . Append ( field , "$gte" , value ) ;
171
+ return this . AppendParameter ( field , "$gte" , value ) ;
172
172
}
173
173
174
174
/// <summary>
175
175
/// Finds all records greater than the provided value
176
176
/// </summary>
177
177
public MongoQuery Greater ( string field , object value ) {
178
- return this . Append ( field , "$gt" , value ) ;
178
+ return this . AppendParameter ( field , "$gt" , value ) ;
179
179
}
180
180
181
181
/// <summary>
182
182
/// Finds all records less than or equal to the provided value
183
183
/// </summary>
184
184
public MongoQuery LessOrEqual ( string field , object value ) {
185
- return this . Append ( field , "$lte" , value ) ;
185
+ return this . AppendParameter ( field , "$lte" , value ) ;
186
186
}
187
187
188
188
/// <summary>
189
189
/// Finds all records less than the provided value
190
190
/// </summary>
191
191
public MongoQuery Less ( string field , object value ) {
192
- return this . Append ( field , "$lt" , value ) ;
192
+ return this . AppendParameter ( field , "$lt" , value ) ;
193
193
}
194
194
195
195
/// <summary>
196
196
/// Finds records that the requested field exists in
197
197
/// </summary>
198
198
public MongoQuery Exists ( string field ) {
199
- return this . Append ( field , "$exists" , true ) ;
199
+ return this . AppendParameter ( field , "$exists" , true ) ;
200
200
}
201
201
202
202
/// <summary>
203
203
/// Finds records that the requested field does not exist in
204
204
/// </summary>
205
205
public MongoQuery NotExists ( string field ) {
206
- return this . Append ( field , "$exists" , false ) ;
206
+ return this . AppendParameter ( field , "$exists" , false ) ;
207
207
}
208
208
209
209
/// <summary>
@@ -217,7 +217,7 @@ public MongoQuery In(string field, IEnumerable values) {
217
217
/// Finds fields that match any value within the record
218
218
/// </summary>
219
219
public MongoQuery In ( string field , params object [ ] values ) {
220
- return this . Append ( field , "$in" , values ) ;
220
+ return this . AppendParameter ( field , "$in" , values ) ;
221
221
}
222
222
223
223
/// <summary>
@@ -231,14 +231,14 @@ public MongoQuery NotIn(string field, IEnumerable values) {
231
231
/// Finds fields that haven't any matches within the array
232
232
/// </summary>
233
233
public MongoQuery NotIn ( string field , params object [ ] values ) {
234
- return this . Append ( field , "$nin" , values ) ;
234
+ return this . AppendParameter ( field , "$nin" , values ) ;
235
235
}
236
236
237
237
/// <summary>
238
238
/// Finds fields that match all value within the record
239
239
/// </summary>
240
240
public MongoQuery Size ( string field , int size ) {
241
- return this . Append ( field , "$size" , size ) ;
241
+ return this . AppendParameter ( field , "$size" , size ) ;
242
242
}
243
243
244
244
/// <summary>
@@ -252,7 +252,7 @@ public MongoQuery All(string field, IEnumerable values) {
252
252
/// Finds fields that match all value within the record
253
253
/// </summary>
254
254
public MongoQuery All ( string field , params object [ ] values ) {
255
- return this . Append ( field , "$all" , values ) ;
255
+ return this . AppendParameter ( field , "$all" , values ) ;
256
256
}
257
257
258
258
/// <summary>
@@ -266,7 +266,7 @@ public MongoQuery Mod(string field, int value) {
266
266
/// Performs a modulo comparison (field % value == compare)
267
267
/// </summary>
268
268
public MongoQuery Mod ( string field , int value , int compare ) {
269
- return this . Append ( field , "$mod" , new int [ ] { value , compare } ) ;
269
+ return this . AppendParameter ( field , "$mod" , new int [ ] { value , compare } ) ;
270
270
}
271
271
272
272
#endregion
0 commit comments