@@ -70,7 +70,7 @@ as follows:
70
70
.. code-block:: csharp
71
71
:emphasize-lines: 3
72
72
73
- var restaurantsDatabase = client.GetDatabase("sample_restaurants")
73
+ var restaurantsDatabase = client.GetDatabase("sample_restaurants");
74
74
var restaurantsCollection = restaurantsDatabase.GetCollection<Restaurant>("restaurants");
75
75
var queryableCollection = restaurantsCollection.AsQueryable();
76
76
@@ -591,29 +591,63 @@ in the Atlas manual and select :guilabel:`C#` from the language dropdown.
591
591
$bitAnd
592
592
~~~~~~~
593
593
594
- The ``$bitAnd`` aggregation stage performs a bitwise AND operation on the list
595
- of arguments. The arguments should be a list of ``NumberInt`` and ``NumberLong`` //check these out
596
- values.
594
+ The ``$bitAnd`` aggregation stage performs a bitwise AND operation on the given
595
+ arguments. ``$bitAnd`` can take // describe arguments
596
+
597
+ ..code-block:: csharp
598
+ var queryable = collection.AsQueryable()
599
+ .Select(x => x.P & x.Q
600
+ );
601
+
602
+ The result of the preceding example look like this:
603
+
604
+ // what should the parameters look like?
597
605
598
606
// 2 arguments <-- the example should correspond to the pagewide example
599
607
// 3 arguments
600
608
601
-
602
609
// restaurants collection
603
610
604
611
605
612
$bitOr
606
613
~~~~~~
607
614
615
+ The ``$bitOr`` aggregation stage performs a bitwise OR operation on the given
616
+ arguments. ``$bitOr`` can take // describe arguments - same as AND and XOR
617
+
618
+ ..code-block:: csharp
619
+ var queryable = collection.AsQueryable()
620
+ .Select(x => x.P | x.Q
621
+ );
622
+
623
+ The result of the preceding example look like this:
608
624
609
625
$bitNot
610
626
~~~~~~~
611
627
628
+ The ``$bitNot`` aggregation stage performs a bitwise NOT operation on the given
629
+ argument. ``$bitOr`` only takes one argument.
630
+
631
+ ..code-block:: csharp
632
+ var queryable = collection.AsQueryable()
633
+ .Select(x => !x.P
634
+ );
635
+
636
+ The result of the preceding example looks like this:
612
637
613
638
$bitXor
614
639
~~~~~~~
615
640
616
- // at the end, add note about the behaviors
641
+ The ``$bitXor`` aggregation stage performs a bitwise XOR operation on the given
642
+ arguments. ``$bitXor`` can take // describe arguments - same as AND and XOR
643
+
644
+ ..code-block:: csharp
645
+ var queryable = collection.AsQueryable()
646
+ .Select(x => x.P ^ x.Q
647
+ );
648
+
649
+ The result of the preceding example look like this:
650
+ // at the end, add note about the behaviors? <-- what is this referring to?
617
651
618
652
Unsupported Aggregation Stages
619
653
------------------------------
0 commit comments