You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Query/MongoQuery.cs
+225-2Lines changed: 225 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -401,6 +401,229 @@ public long Count() {
401
401
402
402
#region Updating
403
403
404
+
#region PullAll
405
+
/// <summary>
406
+
/// removes all occurrences of each value in value_array from field, if field is an array. If field is present but is not an array, an error condition is raised.
407
+
/// </summary>
408
+
/// <param name="field"></param>
409
+
/// <param name="value"></param>
410
+
publicvoidPullAll(stringfield,objectvalue)
411
+
{
412
+
vardoc=newBsonDocument();
413
+
doc[field]=value;
414
+
PullAll(doc);
415
+
}
416
+
/// <summary>
417
+
/// removes all occurrences of each value in value_array from field, if field is an array. If field is present but is not an array, an error condition is raised.
418
+
/// </summary>
419
+
/// <param name="document"></param>
420
+
publicvoidPullAll(objectdocument)
421
+
{
422
+
PullAll(newBsonDocument(document));
423
+
}
424
+
/// <summary>
425
+
/// removes all occurrences of each value in value_array from field, if field is an array. If field is present but is not an array, an error condition is raised.
/// appends value to field, if field is an existing array, otherwise sets field to the array [value] if field is not present. If field is present but is not an array, an error condition is raised.
536
+
/// </summary>
537
+
/// <param name="field"></param>
538
+
/// <param name="value"></param>
539
+
publicvoidPush(stringfield,objectvalue)
540
+
{
541
+
vardoc=newBsonDocument();
542
+
doc[field]=value;
543
+
Push(doc);
544
+
}
545
+
/// <summary>
546
+
/// appends value to field, if field is an existing array, otherwise sets field to the array [value] if field is not present. If field is present but is not an array, an error condition is raised.
547
+
/// </summary>
548
+
/// <param name="document"></param>
549
+
publicvoidPush(objectdocument)
550
+
{
551
+
Push(newBsonDocument(document));
552
+
}
553
+
/// <summary>
554
+
/// appends value to field, if field is an existing array, otherwise sets field to the array [value] if field is not present. If field is present but is not an array, an error condition is raised.
/// appends each value in value_array to field, if field is an existing array, otherwise sets field to the array value_array if field is not present. If field is present but is not an array, an error condition is raised.
567
+
/// </summary>
568
+
/// <param name="field"></param>
569
+
/// <param name="value"></param>
570
+
publicvoidPushAll(stringfield,objectvalue)
571
+
{
572
+
vardoc=newBsonDocument();
573
+
doc[field]=value;
574
+
PushAll(doc);
575
+
}
576
+
/// <summary>
577
+
/// appends each value in value_array to field, if field is an existing array, otherwise sets field to the array value_array if field is not present. If field is present but is not an array, an error condition is raised.
578
+
/// </summary>
579
+
/// <param name="document"></param>
580
+
publicvoidPushAll(objectdocument)
581
+
{
582
+
PushAll(newBsonDocument(document));
583
+
}
584
+
/// <summary>
585
+
/// appends each value in value_array to field, if field is an existing array, otherwise sets field to the array value_array if field is not present. If field is present but is not an array, an error condition is raised.
0 commit comments