Add a user to the database
The username for the new user
可选passwordOrOptions: string | AddUserOptions
An optional password for the new user, or the options for the command
可选options: AddUserOptions
Optional settings for the command
Retrieve the server build information
可选options: CommandOperationOptions
Optional settings for the command
Execute a command
The command to execute
可选options: CommandOperationOptions
Optional settings for the command
List the available databases
可选options: ListDatabasesOptions
Optional settings for the command
Ping the MongoDB server and retrieve results
可选options: CommandOperationOptions
Optional settings for the command
Remove a user from a database
The username to remove
可选options: CommandOperationOptions
Optional settings for the command
Get ReplicaSet status
可选options: CommandOperationOptions
Optional settings for the command
Retrieve the server build information
可选options: CommandOperationOptions
Optional settings for the command
Retrieve this db's server status.
可选options: CommandOperationOptions
Optional settings for the command
Validate an existing collection
The name of the collection to validate.
可选options: ValidateCollectionOptions
Optional settings for the command
The Admin class is an internal class that allows convenient access to the admin functionality and commands for MongoDB.
ADMIN Cannot directly be instantiated
示例