On this page本页内容
dropAllRolesFromDatabase¶Deletes all user-defined roles on the database where you run the command.
Warning
The dropAllRolesFromDatabase removes all
user-defined roles from the database.
The dropAllRolesFromDatabase command takes the following form:
The command has the following fields:
dropAllRolesFromDatabase |
integer | Specify 1 to drop all user-defined roles from the database where the command is run. |
writeConcern |
document | writeConcern document takes the same fields as the getLastError command. |
comment |
any |
A comment can be any valid BSON type (string, integer, object, array, etc).
|
The following operations drop all user-defined roles from the products database:
The n field in the results document reports the number of roles dropped: