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
是副本集的成员,那么isWritablePrimary
和secondary
字段将报告实例是primary
实例还是副本集的secondary
成员。
hello
for the complete documentation of the output of db.hello()
.db.hello()
输出的完整文档hello
。