Mongo.getReadPrefMode()
Mongo() connection object.Mongo() 连接对象的当前读取首选项模式。 |
See Read Preference for an introduction to read preferences in MongoDB. 有关MongoDB中的读取首选项的介绍,请参阅读取首选项。Use 使用getReadPrefMode()
to return the current read preference mode, as in the following example:getReadPrefMode()
返回当前的读取首选项模式,如下例所示:
db.getMongo().getReadPrefMode()
Use the following operation to return and print the current read preference mode:使用以下操作返回并打印当前的读取首选项模式:
print(db.getMongo().getReadPrefMode());
This operation will return one of the following read preference modes:此操作将返回以下读取首选项模式之一: