db.hello()

db.hello()

New in version 5.0.在版本5.0中新增 (and 4.4.2, 4.2.10, 4.0.21, and 3.6.21)

Returns a document that describes the role of the mongod instance.返回描述mongod实例角色的文档。

If the mongod is a member of a replica set, then the isWritablePrimary and secondary fields report if the instance is the primary or if it is a secondary member of the replica set.如果mongod副本集的成员,那么isWritablePrimarysecondary字段将报告实例是primary实例还是副本集的secondary成员。

Tip提示
See: 参阅:

hello for the complete documentation of the output of db.hello().db.hello()输出的完整文档hello

←  db.getSiblingDB()db.help() →