80. //获取支持的所有命令信息 ListCommandsCmd获取所有支持的命令 db.listCommands() 81. static const CommandMap& allCommands() { 82. return *_commands; 83. } 84. 85. //没用 86. static const CommandMap& allCommandsByBestName() { 87. return *_commandsByBestName; 88. } 89. 90. //收...
file names: a list of files to run. files have to end in .js and will exit after unless --shell is specified 2)基于MongoDB支持的javascript实现远程连接 当你已经连接到一个远程的MongoDB数据库服务器(例如,通过mongo连接到192.168.0.184),现在想要在这个会话中连接另一个远程的数据库服务器(192.168.0...
listCommands() lists all the db commands db.loadServerScripts() loads all the myscripts in db.system.js db.logout() db.printCollectionStats() db.printReplicationInfo() db.printShardingStatus() db.printSlaveReplicationInfo() db.resetError() db.runCommand(cmdObj) run a database command. if...
use<db_name>set current database db.foo.find() list objects in collection foo db.foo.find( { a : 1 } ) list objects in foo where a == 1 it result of the last line evaluated; use to further iterate DBQuery.shellBatchSize = x set default number of items to display on shell exit...
对数据库进行管理和操作的基本命令,可以从上面获取到。如果想要得到更多,而且每个命令的详细用法,可以使用上面列出的db.listCommands()查询。另一个比较基础的是对指定数据库的集合进行操作、管理和监控,可以通过查询db.mycoll.help()获取到:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21...
db.listCommands() // lists all the db commands db.loadServerScripts() // loads all the scripts in db.system.js db.logout() db.printCollectionStats() // 返回当前库的数据集状态 db.printReplicationInfo() // 打印主数据库的复制状态信息 ...
db.listCommands() lists all the db commands db.loadServerScripts() loads all the scripts in db.system.js db.logout() db.printCollectionStats() db.printReplicationInfo() db.printShardingStatus() db.printSlaveReplicationInfo() db.dropUser(username) ...
RunCommands(...)接口从message中解析出OpMsg信息,然后获取该OpMsg对应的command命令信息,最后执行该命令对应的后续处理操作。主要功能说明如下: ① 获取该OpCode对应replyBuilder,OP_MSG操作对应builder为OpMsgReplyBuilder。 ② 根据message解析出OpMsgRequest数据,OpMsgRequest来中包含了真正的命令请求bson信息。 ③ opC...
listCommands Lists all database commands provided by the current mongod instance. listDatabases Returns a document that lists all databases and returns basic database statistics. netstat Internal command that reports on intra-deployment connectivity. Only available for mongos instances. ping Internal comm...
listCommands 列出当前 mongod 实例提供的所有数据库命令。 是 lockInfo 内部命令,返回当前正在保持或待定的锁信息。仅用于 mongod 实例。 不支持 M0、M2、M5 和 Flex 集群。 ping 用于测试部署内连接的内部命令。 是 profile 数据库分析器的接口。 是 serverStatus 返回实例范围内资源利用率和状态的集合指标。