PHP » GoLang |
login |
register |
about
|
GoLang MongoDB\Driver\Manager::getReadPreference
request it (325)
GoLang replacement for PHP's MongoDB\Driver\Manager::getReadPreference
[edit | history]
PHP MongoDB\Driver\Manager::getReadPreferencePHP original manual for MongoDB\Driver\Manager::getReadPreference [ show | php.net ]MongoDB\Driver\Manager::getReadPreference(mongodb >=1.0.0) MongoDB\Driver\Manager::getReadPreference — Return the ReadPreference for the Manager Description
final public MongoDB\Driver\ReadPreference MongoDB\Driver\Manager::getReadPreference
( void
)
Returns the MongoDB\Driver\ReadPreference for the Manager, which is derived from its URI options. This is the default read preference for queries and commands executed on the Manager. ParametersThis function has no parameters. Return ValuesThe MongoDB\Driver\ReadPreference for the Manager. Errors/Exceptions
ExamplesExample #1 MongoDB\Driver\Manager::getReadPreference() example
<?php The above example will output something similar to: object(MongoDB\Driver\ReadPreference)#2 (1) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#1 (2) { ["mode"]=> string(18) "secondaryPreferred" ["tags"]=> array(3) { [0]=> object(stdClass)#3 (2) { ["dc"]=> string(2) "ny" ["rack"]=> string(1) "1" } [1]=> object(stdClass)#4 (1) { ["dc"]=> string(2) "ny" } [2]=> object(stdClass)#5 (0) { } } } See Also
|
more
Recently updated
more
Most requested
more
Last requests
|