db.hello() in mongoDB

db.hello()

This method returns a document that describes the role of the mongod instance.


Syntax:

db.hello()


Example

MongoDB

db.hello()

Output:

{
    "isWritablePrimary" : true,
    "topologyVersion" : {
            "processId" : ObjectId("62b40861b169ffdaf4e629c3"),
            "counter" : NumberLong(0)
    },
    "maxBsonObjectSize" : 16777216,
    "maxMessageSizeBytes" : 48000000,
    "maxWriteBatchSize" : 100000,
    "localTime" : ISODate("2022-06-26T06:46:19.187Z"),
    "logicalSessionTimeoutMinutes" : 30,
    "connectionId" : 10,
    "minWireVersion" : 0,
    "maxWireVersion" : 13,
    "readOnly" : false,
    "ok" : 1
}



No comments:

Post a Comment