@@ -572,6 +572,7 @@ document::value operation_runner::_run_find_one_and_update(document::view operat
572572 }
573573 break ;
574574 }
575+
575576 case bsoncxx::type::k_array: {
576577 pipeline update = build_pipeline (arguments[" update" ].get_array ().value );
577578 if (session) {
@@ -581,6 +582,26 @@ document::value operation_runner::_run_find_one_and_update(document::view operat
581582 }
582583 break ;
583584 }
585+
586+ case bsoncxx::type::k_double:
587+ case bsoncxx::type::k_string:
588+ case bsoncxx::type::k_binary:
589+ case bsoncxx::type::k_undefined:
590+ case bsoncxx::type::k_oid:
591+ case bsoncxx::type::k_bool:
592+ case bsoncxx::type::k_date:
593+ case bsoncxx::type::k_null:
594+ case bsoncxx::type::k_regex:
595+ case bsoncxx::type::k_dbpointer:
596+ case bsoncxx::type::k_code:
597+ case bsoncxx::type::k_symbol:
598+ case bsoncxx::type::k_codewscope:
599+ case bsoncxx::type::k_int32:
600+ case bsoncxx::type::k_timestamp:
601+ case bsoncxx::type::k_int64:
602+ case bsoncxx::type::k_decimal128:
603+ case bsoncxx::type::k_maxkey:
604+ case bsoncxx::type::k_minkey:
584605 default :
585606 throw std::logic_error{" update must be a document or an array" };
586607 }
@@ -778,6 +799,7 @@ document::value operation_runner::_run_update_many(document::view operation) {
778799 }
779800 break ;
780801 }
802+
781803 case bsoncxx::type::k_array: {
782804 pipeline update = build_pipeline (arguments[" update" ].get_array ().value );
783805 if (session) {
@@ -787,6 +809,26 @@ document::value operation_runner::_run_update_many(document::view operation) {
787809 }
788810 break ;
789811 }
812+
813+ case bsoncxx::type::k_double:
814+ case bsoncxx::type::k_string:
815+ case bsoncxx::type::k_binary:
816+ case bsoncxx::type::k_undefined:
817+ case bsoncxx::type::k_oid:
818+ case bsoncxx::type::k_bool:
819+ case bsoncxx::type::k_date:
820+ case bsoncxx::type::k_null:
821+ case bsoncxx::type::k_regex:
822+ case bsoncxx::type::k_dbpointer:
823+ case bsoncxx::type::k_code:
824+ case bsoncxx::type::k_symbol:
825+ case bsoncxx::type::k_codewscope:
826+ case bsoncxx::type::k_int32:
827+ case bsoncxx::type::k_timestamp:
828+ case bsoncxx::type::k_int64:
829+ case bsoncxx::type::k_decimal128:
830+ case bsoncxx::type::k_maxkey:
831+ case bsoncxx::type::k_minkey:
790832 default :
791833 throw std::logic_error{" update must be a document or an array" };
792834 }
@@ -870,6 +912,7 @@ document::value operation_runner::_run_update_one(document::view operation) {
870912 }
871913 break ;
872914 }
915+
873916 case bsoncxx::type::k_array: {
874917 pipeline update = build_pipeline (arguments[" update" ].get_array ().value );
875918 if (session) {
@@ -879,6 +922,26 @@ document::value operation_runner::_run_update_one(document::view operation) {
879922 }
880923 break ;
881924 }
925+
926+ case bsoncxx::type::k_double:
927+ case bsoncxx::type::k_string:
928+ case bsoncxx::type::k_binary:
929+ case bsoncxx::type::k_undefined:
930+ case bsoncxx::type::k_oid:
931+ case bsoncxx::type::k_bool:
932+ case bsoncxx::type::k_date:
933+ case bsoncxx::type::k_null:
934+ case bsoncxx::type::k_regex:
935+ case bsoncxx::type::k_dbpointer:
936+ case bsoncxx::type::k_code:
937+ case bsoncxx::type::k_symbol:
938+ case bsoncxx::type::k_codewscope:
939+ case bsoncxx::type::k_int32:
940+ case bsoncxx::type::k_timestamp:
941+ case bsoncxx::type::k_int64:
942+ case bsoncxx::type::k_decimal128:
943+ case bsoncxx::type::k_maxkey:
944+ case bsoncxx::type::k_minkey:
882945 default :
883946 throw std::logic_error{" update must be a document or an array" };
884947 }
@@ -966,10 +1029,31 @@ T _build_update_model(document::view arguments) {
9661029 case bsoncxx::type::k_document: {
9671030 return T (filter, arguments[" update" ].get_document ().value );
9681031 }
1032+
9691033 case bsoncxx::type::k_array: {
9701034 pipeline update = build_pipeline (arguments[" update" ].get_array ().value );
9711035 return T (filter, update);
9721036 }
1037+
1038+ case bsoncxx::type::k_double:
1039+ case bsoncxx::type::k_string:
1040+ case bsoncxx::type::k_binary:
1041+ case bsoncxx::type::k_undefined:
1042+ case bsoncxx::type::k_oid:
1043+ case bsoncxx::type::k_bool:
1044+ case bsoncxx::type::k_date:
1045+ case bsoncxx::type::k_null:
1046+ case bsoncxx::type::k_regex:
1047+ case bsoncxx::type::k_dbpointer:
1048+ case bsoncxx::type::k_code:
1049+ case bsoncxx::type::k_symbol:
1050+ case bsoncxx::type::k_codewscope:
1051+ case bsoncxx::type::k_int32:
1052+ case bsoncxx::type::k_timestamp:
1053+ case bsoncxx::type::k_int64:
1054+ case bsoncxx::type::k_decimal128:
1055+ case bsoncxx::type::k_maxkey:
1056+ case bsoncxx::type::k_minkey:
9731057 default :
9741058 throw std::logic_error{" update must be a document or an array" };
9751059 }
0 commit comments