MongoDB call stats() from C++
MongoDB call stats() from C++
我可能错过了一些非常明显的东西,但现在无法弄清楚-如何从c++驱动程序中查询MongoDB中的"db.collectionname.stats()" ?
您将需要使用该命令的MongoDB runCommand版本,collStats:
{ collStats: "collection" , scale : 1024 }
在集合"collection"上运行stats(),以千字节为单位显示结果。
http://docs.mongodb.org/manual/reference/command/collStats/要使用c++驱动程序发出runCommands,您需要使用DBClientWithCommands::runCommand()
:
http://api.mongodb.org/cxx/current/classmongo_1_1_d_b_client_with_commands.html a06c157017a74badc8831e2f66a34cc2a
相关文章:
- 如何解决"invalid conversion from 'char' to 'const char*'"
- std::async from std::async in windows xp
- std::is_reference from std::any
- std::time_point from and to std::string
- "No suitable conversion function from 'std::string' to 'const char *' exists"
- std::chrono::time_point from std::string
- Visual accept std::string from std::byte iterator
- C++中链表的错误"Abort signal from abort(3) (sigabrt) "
- dopen():不以 root 身份运行时"failed to map segment from shared object"
- C++ 中的"template <typename From, typename Tag> struct Alias;"是什么?
- from std::vector to adept::avector
- qt get child (Callout) from QChart
- Webassembly from Javascript
- Generate boost::uuids::uuid from boost::compute::detail::sha
- 什么是"Reading unbounded stream from standard input (Memory Management)"的例子
- Calling C++ dll from python
- 为什么我会收到"invalid conversion from 'Queue*/Stack*' to 'int'"错误消息?
- std::chrono 在从 main 或 from 类方法使用时给出不同的值
- Calling Python Script from Visual Studio C++ Solution
- Access C++ Enum from Swift