27
27
#include < cstdint>
28
28
29
29
#include " mongocxx/options/client.hpp"
30
- #include " mongocxx/stdx.hpp"
31
30
#include " mongocxx/cursor.hpp"
32
31
#include " bsoncxx/json.hpp"
33
32
#include " bsoncxx/builder/stream/helpers.hpp"
36
35
#include " bsoncxx/builder/stream/array.hpp"
37
36
#include " bsoncxx/document/value.hpp"
38
37
#include " bsoncxx/document/view.hpp"
39
- #include " bsoncxx/stdx/make_unique.hpp"
40
38
#include " bsoncxx/stdx/optional.hpp"
41
39
#include " bsoncxx/stdx/string_view.hpp"
42
40
#include " bsoncxx/builder/basic/array.hpp"
@@ -465,7 +463,7 @@ namespace mongodbembed
465
463
size32_t utf8chars;
466
464
char *utf8;
467
465
rtlUnicodeToUtf8X (utf8chars, utf8, chars, value);
468
- query->build ()->append (kvp (std::string (field->name ), bsoncxx::types::b_utf8 {utf8}));
466
+ query->build ()->append (kvp (std::string (field->name ), bsoncxx::types::b_string {utf8}));
469
467
}
470
468
471
469
/* *
@@ -678,7 +676,7 @@ namespace mongodbembed
678
676
}
679
677
680
678
/* *
681
- * @brief Binds an ECL Data param to a bsoncxx::types::b_utf8
679
+ * @brief Binds an ECL Data param to a bsoncxx::types::b_string
682
680
*
683
681
* @param name Name of the parameter.
684
682
* @param len Length of the value.
@@ -786,7 +784,7 @@ namespace mongodbembed
786
784
}
787
785
788
786
/* *
789
- * @brief Binds an ECL String param to a bsoncxx::types::b_utf8 .
787
+ * @brief Binds an ECL String param to a bsoncxx::types::b_string .
790
788
*
791
789
* @param name Name of the parameter.
792
790
* @param len Number of chars in string.
@@ -799,11 +797,11 @@ namespace mongodbembed
799
797
rtlDataAttr utf8;
800
798
rtlStrToUtf8X (utf8Chars, utf8.refstr (), len, val);
801
799
802
- query->build ()->append (kvp (std::string (name), bsoncxx::types::b_utf8 {std::string (utf8.getstr (), rtlUtf8Size (utf8Chars, utf8.getdata ()))}));
800
+ query->build ()->append (kvp (std::string (name), bsoncxx::types::b_string {std::string (utf8.getstr (), rtlUtf8Size (utf8Chars, utf8.getdata ()))}));
803
801
}
804
802
805
803
/* *
806
- * @brief Binds an ECL VString param to a bsoncxx::types::b_utf8 .
804
+ * @brief Binds an ECL VString param to a bsoncxx::types::b_string .
807
805
*
808
806
* @param name Name of the parameter.
809
807
* @param val VString value.
@@ -815,11 +813,11 @@ namespace mongodbembed
815
813
rtlDataAttr utf8;
816
814
rtlStrToUtf8X (utf8Chars, utf8.refstr (), strlen (val), val);
817
815
818
- query->build ()->append (kvp (std::string (name), bsoncxx::types::b_utf8 {std::string (utf8.getstr (), rtlUtf8Size (utf8Chars, utf8.getdata ()))}));
816
+ query->build ()->append (kvp (std::string (name), bsoncxx::types::b_string {std::string (utf8.getstr (), rtlUtf8Size (utf8Chars, utf8.getdata ()))}));
819
817
}
820
818
821
819
/* *
822
- * @brief Binds an ECL UTF8 param to a bsoncxx::types::b_utf8 .
820
+ * @brief Binds an ECL UTF8 param to a bsoncxx::types::b_string .
823
821
*
824
822
* @param name Name of the parameter.
825
823
* @param chars Number of chars in string.
@@ -829,11 +827,11 @@ namespace mongodbembed
829
827
{
830
828
checkNextParam (name);
831
829
832
- query->build ()->append (kvp (std::string (name), bsoncxx::types::b_utf8 {std::string (val, rtlUtf8Size (chars, val))}));
830
+ query->build ()->append (kvp (std::string (name), bsoncxx::types::b_string {std::string (val, rtlUtf8Size (chars, val))}));
833
831
}
834
832
835
833
/* *
836
- * @brief Binds an ECL Unicode param to a bsoncxx::types::b_utf8 .
834
+ * @brief Binds an ECL Unicode param to a bsoncxx::types::b_string .
837
835
*
838
836
* @param name Name of the parameter.
839
837
* @param chars Number of chars in string.
@@ -846,7 +844,7 @@ namespace mongodbembed
846
844
rtlDataAttr utf8;
847
845
rtlUnicodeToUtf8X (utf8chars, utf8.refstr (), chars, val);
848
846
849
- query->build ()->append (kvp (std::string (name), bsoncxx::types::b_utf8 {std::string (utf8.getstr (), rtlUtf8Size (utf8chars, utf8.getdata ()))}));
847
+ query->build ()->append (kvp (std::string (name), bsoncxx::types::b_string {std::string (utf8.getstr (), rtlUtf8Size (utf8chars, utf8.getdata ()))}));
850
848
}
851
849
852
850
/* *
@@ -863,7 +861,7 @@ namespace mongodbembed
863
861
bsoncxx::stdx::string_view) noexcept {}
864
862
};
865
863
866
- auto instance = bsoncxx::stdx:: make_unique<mongocxx::instance>(bsoncxx::stdx ::make_unique<noop_logger>());
864
+ auto instance = std:: make_unique<mongocxx::instance>(std ::make_unique<noop_logger>());
867
865
868
866
MongoDBConnection::createInstance ().configure (std::move (instance));
869
867
}
@@ -1111,7 +1109,7 @@ namespace mongodbembed
1111
1109
{
1112
1110
builder << param << ele.get_double ().value ;
1113
1111
}
1114
- else if (ele.type () == bsoncxx::type::k_utf8 )
1112
+ else if (ele.type () == bsoncxx::type::k_string )
1115
1113
{
1116
1114
builder << param << ele.get_string ().value ;
1117
1115
}
@@ -1147,7 +1145,7 @@ namespace mongodbembed
1147
1145
{
1148
1146
ctx << ele.get_double ().value ;
1149
1147
}
1150
- else if (ele.type () == bsoncxx::type::k_utf8 )
1148
+ else if (ele.type () == bsoncxx::type::k_string )
1151
1149
{
1152
1150
ctx << ele.get_string ().value ;
1153
1151
}
@@ -1196,7 +1194,7 @@ namespace mongodbembed
1196
1194
}
1197
1195
else
1198
1196
{
1199
- if (view[key].type () == bsoncxx::type::k_utf8 )
1197
+ if (view[key].type () == bsoncxx::type::k_string )
1200
1198
{
1201
1199
insertValue (builder, std::string (view[key].get_string ().value ), view[value.substr (1 )]);
1202
1200
}
@@ -1323,7 +1321,7 @@ namespace mongodbembed
1323
1321
}
1324
1322
else
1325
1323
{
1326
- if (view[key].type () == bsoncxx::type::k_utf8 )
1324
+ if (view[key].type () == bsoncxx::type::k_string )
1327
1325
{
1328
1326
builder << key << open_document << [&](key_context<> ctx) {
1329
1327
buildDocument (ctx, view, ++start);
@@ -1338,7 +1336,7 @@ namespace mongodbembed
1338
1336
{
1339
1337
if (!isRsvd)
1340
1338
{
1341
- if (view[key].type () == bsoncxx::type::k_utf8 )
1339
+ if (view[key].type () == bsoncxx::type::k_string )
1342
1340
key = std::string{view[key].get_string ().value };
1343
1341
else
1344
1342
failx (" Key must be type String." );
0 commit comments