MongoDB call stats() from C++ -


i missing pretty obvious cannot figure out - how query "db.collectionname.stats()" in mongodb c++ driver?

you want use mongodb runcommand version of command, collstats:

{ collstats: "collection" , scale : 1024 } 

which runs stats() on collection "collection" displaying results in kilobytes.

http://docs.mongodb.org/manual/reference/command/collstats/

to issue runcommands using c++ driver want use dbclientwithcommands::runcommand() :

http://api.mongodb.org/cxx/current/classmongo_1_1_d_b_client_with_commands.html#a06c157017a74badc8831e2f66a34cc2a


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -