PHP » GoLang |
login |
register |
about
|
GoLang MongoDB\Driver\WriteConcern::bsonSerialize
request it (265)
GoLang replacement for PHP's MongoDB\Driver\WriteConcern::bsonSerialize
[edit | history]
PHP MongoDB\Driver\WriteConcern::bsonSerializePHP original manual for MongoDB\Driver\WriteConcern::bsonSerialize [ show | php.net ]MongoDB\Driver\WriteConcern::bsonSerialize(mongodb >=1.2.0) MongoDB\Driver\WriteConcern::bsonSerialize — Returns an object for BSON serialization Description
final public object MongoDB\Driver\WriteConcern::bsonSerialize
( void
)
ParametersThis function has no parameters. Return ValuesReturns an object for serializing the WriteConcern as BSON. Errors/Exceptions
ExamplesExample #1 MongoDB\Driver\WriteConcern::bsonSerialize() with majority write concern
<?php The above example will output something similar to: object(stdClass)#2 (1) { ["w"]=> string(8) "majority" } { "w" : "majority" } Example #2 MongoDB\Driver\WriteConcern::bsonSerialize() with wtimeout and journal
<?php The above example will output something similar to: object(stdClass)#2 (3) { ["w"]=> int(2) ["j"]=> bool(true) ["wtimeout"]=> int(1000) } { "w" : 2, "j" : true, "wtimeout" : 1000 } See Also
|
more
Recently updated
more
Most requested
more
Last requests
|