Retrieve the server build information检索服务器内部版本信息
Optional
options: CommandOperationOptionsOptional settings for the command命令的可选设置
Execute a command执行命令
The driver will ensure the following fields are attached to the command sent to the server:驱动程序将确保以下字段附加到发送到服务器的命令中:
lsid
- options.session
$readPreference
- options.readPreference
进行配置$db
- If the client has a serverApi setting:如果客户端具有serverApi设置:
apiVersion
apiStrict
apiDeprecationErrors
When in a transaction:在事务中:
readConcern
- TransactionOptions
上设置的readConcern
writeConcern
- TransactionOptions
上设置的writeConcern
Attaching any of the above fields to the command will have no effect as the driver will overwrite the value.将上述任何字段附加到命令将不会产生任何效果,因为驱动程序将覆盖该值。
The command to execute要执行的命令
Optional
options: RunCommandOptionsOptional settings for the command命令的可选设置
List the available databases列出可用的数据库
Optional
options: ListDatabasesOptionsOptional settings for the command命令的可选设置
Ping the MongoDB server and retrieve resultsPing MongoDB服务器并检索结果
Optional
options: CommandOperationOptionsOptional settings for the command命令的可选设置
Remove a user from a database从数据库中删除用户
The username to remove要删除的用户名
Optional
options: CommandOperationOptionsOptional settings for the command命令的可选设置
Get ReplicaSet status获取ReplicaSet状态
Optional
options: CommandOperationOptionsOptional settings for the command命令的可选设置
Retrieve the server build information检索服务器内部版本信息
Optional
options: CommandOperationOptionsOptional settings for the command命令的可选设置
Retrieve this db's server status.检索此数据库的服务器状态。
Optional
options: CommandOperationOptionsOptional settings for the command命令的可选设置
Validate an existing collection验证现有集合
The name of the collection to validate.要验证的集合的名称。
Optional settings for the command命令的可选设置
Generated using TypeDoc
The Admin class is an internal class that allows convenient access to the admin functionality and commands for MongoDB.Admin类是一个内部类,它允许方便地访问MongoDB的管理功能和命令。ADMIN Cannot directly be instantiatedADMIN不能直接实例化Example