The page about the latest version of C++ Driver says:
Please note that this version of mongocxx requires the MongoDB C driver 1.10.1.
Should I get this literally? I'm asking because the latest version of C Driver is 1.13.0... should I rollback to…
I have a C++ application which is processing JSON and inserting into DB. It's doing a pretty simple insert, parses the JSON adds a couple of fields and inserts as below.
I have also surrounded the call with a try/catch to handle any exceptions that…
if I compile the c driver with -DENABLE_SSL=WINDOWS (windows secure Channel), connection would be failed if the client pem key file has password.
the error info of log:
[error@stream-secure-channel] Failed to parse private key. ASN1 bad tag…
I follow the official tutorial for the installation : https://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/installation/
I've enabled the flag --enable-static=yes with the ./configure before doing make && sudo make install and I got the…
I'mm trying to build mongocxx driver for vc++ 2017 community edition.
I ran below and got errors and retargetted to latest build tools and got successfully compiled.
cd mongo-c-driver-1.8.0\src\libbson
cmake -G "Visual Studio 14 2015 Win64" \
…
I have a db with huge amount of documents, and I only want to query documents with "_id" from a list. I searched online for a few hours, and did not find anything really working, so I post my question here. Thank you very much for any help!
in…
I got a problem with function bson_append_double below:
dvalue = 0.01;
bson_append_double(pbson, field_name, -1,(double)dvalue);
but the result i got is annoying long: 0.0099999997764825820923
Did anyone faced this problem before, please help…
In pymongo you can do something like this to create an OID from time:
dummy_id = ObjectId.from_datetime(time)
Is there something like that in mongoc?
I saw that there's a "bson_oid_get_time_t()" function, but is there a reverse function of this,…
I am trying to append a requirement to my BCON query where 'tribe_type' does not equal 'initial-public'.
My original code was and that worked:
query = BCON_NEW ("_id", BCON_OID(&oid));
When I add the second part, it compiles, however the mongo…
I have followed the instructions in the following document to the letter (including the instructions for building mongo-c-driver): https://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/installation/
I am attempting to build the sample code provided…
I'm new to the Mongo C# driver and I'm trying to create a intersect query in C#. I have the function working in Javascript but I'm struggling with some of the classes in the Mongo driver.
At the moment I have the GeoJson pulling fine but when I…
I have a collection as "UserRecords". structure for this is as follows
{
"_id" : "ee654ce6-e50d-4243-8738-35c087a85e67",
"_t" : "Animals",
"ClickedOn" : NumberLong(1452600122),
"Category" : "Nature",
"UserId" : "a1",
…
I am using mongo c driver 1.1 with mongo version 3.0. I need to write a function that gets a cursor to a collection. I found the following example in the documentation.
http://api.mongodb.org/c/1.1.0/mongoc_cursor_t.html
collection =…
I am using mongo 3.0.8. I have an authenticated user admin with password admin. I am able to connect to the mongo shell as follows.
mongo admin -u amdin -p amdin
However, i tried to connect to using the following C code. This gives me an…