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()
:
Comments
Post a Comment