Database Manual / Reference / mongosh Methods / Databases

db.commandHelp() (mongosh method方法)

Description

db.commandHelp(command)

Displays help text for the specified database command. See the Database Commands.显示指定数据库命令的帮助文本。请参阅数据库命令

The db.commandHelp() method has the following parameter:db.commandHelp()方法具有以下参数:

Parameter参数Type类型Description描述
commandstring字符串The name of a database command.数据库命令的名称。

Compatibility兼容性

This method is available in deployments hosted in the following environments:此方法在以下环境中托管的部署中可用:

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud:云中MongoDB部署的完全托管服务

Important

This command has limited support in all MongoDB Atlas clusters. For more information, see Unsupported Commands.此命令在所有MongoDB Atlas集群中的支持有限。有关详细信息,请参阅不支持的命令

  • MongoDB Enterprise: The subscription-based, self-managed version of MongoDB:MongoDB的基于订阅的自我管理版本
  • MongoDB Community: The source-available, free-to-use, and self-managed version of MongoDB:MongoDB的源代码可用、免费使用和自我管理版本