Questions tagged [mongo-c-driver]

Officially supported C Driver for MongoDB

MongoDB C Driver is an officially supported driver for MongoDB. It is written in pure C.

More information:

126 questions
1
vote
0 answers

Package 'libmongoc-1.0', required by 'libmongocxx', not found

I am trying to get the libmongocxx to run on Debian Jessie 64bit after compiling it according to the : quickstartguide I added the path the find command returned as the location for the libmongoc-1.0.pc file the compiler is complaining missing: $:…
enigma
  • 79
  • 2
  • 11
1
vote
1 answer

Mongo C Driver: Insert UTC Time directly into BCON $push

I am trying to insert a UTC timestamp directly into my $push command (below). I would like to get the UTC string in the spot that currently says "UTC TIME HERE PLEASE". update = BCON_NEW ("$push", "{", "folder.0.files", …
Steven Carlson
  • 925
  • 1
  • 10
  • 25
1
vote
1 answer

unable import a large json file into mongoDB using mongo-c driver

I am trying to import a large json file into mongodb, one object at a time. a.json is a json file with a single record containing 15 key:value pairs. I am using the following code: # include #include #include int…
Abin
  • 113
  • 1
  • 1
  • 8
1
vote
3 answers

Error installing Monary 0.4 on Ubuntu

I've been trying unsuccessfully to install Monary on a VM running Ubuntu 14.04.1 LTS. I've installed the Mongo C drivers and I think that's been done properly. Apologies for the full text. [update: enabled ssl and sasl using: sudo apt-get install…
konel
  • 15
  • 3
1
vote
1 answer

mongo c++ Bsonbuilder, BSONObj to final c BSON

The underlying goal here is read json with arrays sub documents and whatever in string format {key:"value", boolkey, true, {subkey: value}, array: [x,y,z] } and not caring to undertake append_int, append_bool and all that jazz. any way of using the…
Gabe Rainbow
  • 3,658
  • 4
  • 32
  • 42
1
vote
1 answer

mongoc: Do not get $unwind to work with mongoDB c driver

I have documents like this using an array of subdocuments "c". { "_id" : 1, "c" : [ { "p" : { "name" : "SimpleGroup" } }, { "p" : { "name" : "SimpleGroup2" …
Totonga
  • 4,236
  • 2
  • 25
  • 31
1
vote
1 answer

Memory corruption with mongo c driver

I have a memory corruption and I have no idea why. The error message is: ERROR: *** Error in `./server': malloc(): memory corruption (fast): 0x0000000000d743f0 *** I'm using the mongoc library version 1.1.10. This is a snippet of my code: int…
Malder
  • 11
  • 5
1
vote
0 answers

mongo.h file not found on yosemite

I was installed the MongoDB C driver on my Mac OSX Yosemite. Using ./configure --prefix=/usr --libdir=/usr/lib64 ./autogen.sh make sudo make install make test Everything is okay but when I try to compile C code with Xcode or GCC on…
boated_tw
  • 414
  • 1
  • 9
  • 19
1
vote
2 answers

mongodb one to many relation

I am new to MongoDB moving in from traditional SQL relational approach. I am working on a simple “Category has many Products” scenario (c#.Net). Where Category has List My questions are. Question 1: On Add Product screen I have a drop…
Raas Masood
  • 1,475
  • 3
  • 23
  • 61
1
vote
1 answer

Mongodb C driver, test if server is running?

I've created a client that needs to read and process data from the database. I've realised that I can't test the connection I create with mongoc_client_new by just testing if that is null, because the driver uses lazy connections. How do I test if…
FreakShow
  • 57
  • 7
1
vote
1 answer

mongoc_init() and mongoc_cleanup() may make memory "still reachable"

I have a class to do mongodb operation using mongodb-c-driver. In the constructor, mongoc_init() is called. In deconstructor, mongoc_cleanup() is called. Then, valgrind 3.10.1 told me that some memory "still reachable". Part of the valgrind output…
BAE
  • 8,550
  • 22
  • 88
  • 171
1
vote
0 answers

Return the textScore using the mongo C driver

I'm trying to recreate the following query using the mongo-c-driver. db.djnNews.find({"date":"2014-02-06",$text:{$search:"GOOG"}},{score:{$meta:"textScore"}}) The text index is working fine. I can run: query =…
1
vote
1 answer

How to set MaxTimeMS for a MongoDB query when using the C driver (mongoc)

Using mongoc and MongoDB >= 2.6, how do I set the MaxTimeMS for a find and for a aggregate()?
Dave Wilkin
  • 231
  • 1
  • 3
  • 13
1
vote
1 answer

bson_finish() can be used in mongo-c-driver-1.0.2?

I am using mongo-c-driver-1.0.2. Can I use bson_finish()? I already added . But the error is error: ‘bson_finish’ was not declared in this scope. Should I use bson_finish()?
BAE
  • 8,550
  • 22
  • 88
  • 171
1
vote
1 answer

valgrind - connectiong to mognodb with C api without causing SIGSEGV

I am trying to connect to mongodb with the C-API and my code seems to work fine. However, close inspection with Valgrind complains that I am doing illegal stuff. My program accepts the parameter -h , and then translates this string to a…
oz123
  • 27,559
  • 27
  • 125
  • 187
1 2 3
8 9