PHP » GoLang |
login |
register |
about
|
GoLang MongoDB\Driver\Cursor::getServer
request it (355)
GoLang replacement for PHP's MongoDB\Driver\Cursor::getServer
[edit | history]
PHP MongoDB\Driver\Cursor::getServerPHP original manual for MongoDB\Driver\Cursor::getServer [ show | php.net ]MongoDB\Driver\Cursor::getServer(mongodb >=1.0.0) MongoDB\Driver\Cursor::getServer — Returns the server associated with this cursor Description
final public MongoDB\Driver\Server MongoDB\Driver\Cursor::getServer
( void
)
Returns the MongoDB\Driver\Server associated with this cursor. This is the server that executed the MongoDB\Driver\Query or MongoDB\Driver\Command. ParametersThis function has no parameters. Return ValuesReturns the MongoDB\Driver\Server associated with this cursor. Errors/Exceptions
ExamplesExample #1 MongoDB\Driver\Cursor::getServer() example
<?php The above example will output something similar to: object(MongoDB\Driver\Server)#5 (10) { ["host"]=> string(9) "localhost" ["port"]=> int(27017) ["type"]=> int(1) ["is_primary"]=> bool(false) ["is_secondary"]=> bool(false) ["is_arbiter"]=> bool(false) ["is_hidden"]=> bool(false) ["is_passive"]=> bool(false) ["last_is_master"]=> array(8) { ["ismaster"]=> bool(true) ["maxBsonObjectSize"]=> int(16777216) ["maxMessageSizeBytes"]=> int(48000000) ["maxWriteBatchSize"]=> int(1000) ["localTime"]=> object(MongoDB\BSON\UTCDateTime)#6 (1) { ["milliseconds"]=> int(1446505367907) } ["maxWireVersion"]=> int(3) ["minWireVersion"]=> int(0) ["ok"]=> float(1) } ["round_trip_time"]=> int(584) } See Also |
more
Recently updated
more
Most requested
more
Last requests
|