Questions tagged [mongo-cxx-driver]

Officially supported C++ driver for MongoDB

The MongoDB C++ Driver is an officially supported driver for MongoDB. It is written in C++11. It wraps the MongoDB C Driver.

More information:

259 questions
0
votes
1 answer

How to drop index using mongocxx driver

My program is providing a configurable ttl. So I have to check ttl index every time the program starts, if the expire duration isn't correct, I have to re-index it. I see drop index function in mongoc driver. But it seems there is no such option in…
Jeffwhen
  • 3
  • 2
0
votes
0 answers

Why do I get Error resulting in state DEAD in MongoDB?

I’m working with multidocument mongodb transactions, and I’m getting an unexpected error. In my c++ app, using mongocxx driver, the steps I’m performing are the following: create session start transaction create a bulk_write 1 for this session,…
Federico Caccia
  • 1,817
  • 1
  • 13
  • 33
0
votes
1 answer

static linking mongocxx missing sasl

I am trying to build a simple mongocxx application and I am having linking errors: -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") -- Configuring done -- Generating done -- Build files have been written to: /code/build […
kroiz
  • 1,722
  • 1
  • 27
  • 43
0
votes
1 answer

Build a c++ project with mongodb

I want to save measurements in a mongoDB document and use this data in further operations. I have followed the steps described in this comment by Joyo Waseem to install the needed driver. However, I still get several Error Messages (82 to be…
0
votes
0 answers

Does MongoDB C++ driver compiled with authentication options penalize clients not using authentication?

Mongo C++ driver has two compilation option. From driver documentation: --ssl Enables SSL support. You will need a compatible version of the SSL libraries available.The default authorization mechanism since MongoDB version 3.0 is SCRAM-SHA-1. If…
fgalan
  • 11,732
  • 9
  • 46
  • 89
0
votes
0 answers

How to add mongocxx libraries into Osquery

I'm trying to save the result (JSON) of the scheduled query of osqueryd to MongoDB using mongocxx driver within osquery, however I am getting the below error while building the source code using make command Error : [ 83%] Built target…
0
votes
1 answer

Can not config mongodb in Qt creator

Hello I am using Qt creator 4.6.0 and MongoDB 4.0 in windows 10 and I have already installed mongo-cxx-dirver-r3.3.0 (c++ drivers for mongodb). The problem is, #include #include whenever I include this…
0
votes
0 answers

Mongocxx connection pool (VS Release version) has issue connecting to remote server

I've installed (and have been using it for a while now) mongocxx driver via vcpkg and everything installed correctly and runs perfectly in Debug version (I'm using Visual Studio 2017 and my application is a Windows Form c++ (CLR) application). In my…
Bilal
  • 43
  • 1
  • 11
0
votes
0 answers

querying mongodb collection in c++ using mongocxx driver and returning the resultset to python which called the c++ program

I'm trying to call c++ program from python, that connects to mongo using mongocxx , queries some data and returns the resultset to python. Here's my c++ program. contents of c++ program file #include #include…
0
votes
0 answers

How to change mongocxx document just for client side?

auto cur = collection.find(make_document(kvp("userId", uid)), findOptions); auto collects = bsoncxx::builder::basic::array{}; for (auto &&doc : cur) { doc["time"] = "some new value"; // this line can't execute …
H.He
  • 55
  • 5
0
votes
2 answers

how we can insert mongocxx document which available realtime.?

I am inserting images to the mongodb through c++ API as below : bsoncxx::document::value document = bsoncxx::builder::basic::make_document (kvp("userId", "xZcuQet3QMmS7Q2yc"), …
Rahibe Meryem
  • 269
  • 3
  • 14
0
votes
0 answers

Where can I find Libbsoncxx and what exactly is it asking of me?

CMake Error at plugins/db_plugin/CMakeLists.txt:21 (find_package): By not providing "Findlibbsoncxx.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "libbsoncxx", but CMake did not find…
0
votes
0 answers

Linking MongoDB CXX driver with Qt app project

Our team is stuck on a problem with connecting MongoDB CXX driver to QtCreator 5.10. We have builded and compiled mongo-c-driver and mongo-cxx-driver with CMake and msbuild (VS 2017 compiler). We created test project in Visual Studio added needed…
A. Ko
  • 1
  • 3
0
votes
1 answer

List all the collections of database using mongocxx

I have been trying to pull list of all the collections present in database and trying to use : cursor list_collections(bsoncxx::document::view filter = {}); but not able to iterate over the collections. Can anyone help me on this?
Shringa Bais
  • 191
  • 2
  • 11
0
votes
2 answers

Testing mongocxx c++ driver with a sample code

I'm trying to connect mongdb with mongocxx driver in my C++ sample code. I added Additional include, Libraries and dependencies. When I build it it shows following error. this is the full code #include "stdafx.h" #include #include…
Nwn
  • 561
  • 2
  • 9
  • 33