db.logout() db.logout() db. logout () Ends the current authentication session. This function has no effectif the current session is not authenticated. Note If you’re not lo...
db.isMaster() db.isMaster() db. isMaster () Returns a document that describes the role of the mongod instance. If the mongod is a member of a replica set , thenthe ismast...
db.getSiblingDB() Definition Example db.getSiblingDB() Definition db. getSiblingDB () ParameterTypeDescriptiondatabase stringThe name of a MongoDB database. Returns:A ...
db.getReplicationInfo() Definition Output db.getReplicationInfo() Definition db. getReplicationInfo () Returns a document with the status of the replica set, using datapo...
db.getLastErrorObj() Definition Behavior Example db.getLastErrorObj() Definition db. getLastErrorObj () Specifies the level of write concern for confirming the successo...
db.aggregate() Definition Example Pipeline with $currentOp db.aggregate() Definition New in version 3.6. db. aggregate () Runs a specified admin/diagnostic pipeline whi...