MongoDB\Driver\ReadConcern::getLevel

(mongodb >=1.0.0)

MongoDB\Driver\ReadConcern::getLevelReturns the ReadConcern's "level" option

说明

final public MongoDB\Driver\ReadConcern::getLevel ( void ) : string|null

参数

此函数没有参数。

返回值

Returns the ReadConcern's "level" option.

错误/异常

范例

Example #1 MongoDB\Driver\ReadConcern::getLevel() example

<?php

$rc 
= new MongoDB\Driver\ReadConcern();
var_dump($rc->getLevel());

$rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL);
var_dump($rc->getLevel());

$rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY);
var_dump($rc->getLevel());

?>

以上例程会输出:

NULL
string(5) "local"
string(8) "majority"
相关文章
php mongodb driver manager return the readconcern for the managerphp mongodb driver monitoring commandstartedevent returns the command documentphp mongodb driver monitoring commandstartedevent returns the command namephp mongodb driver monitoring commandstartedevent returns the database on which the command was executedphp mongodb driver monitoring commandstartedevent returns the command s operation idphp mongodb driver readconcern returns an object for bson serializationphp mongodb driver readconcern create a new readconcernphp mongodb driver readconcern returns the readconcern s level optionphp mongodb driver readpreference returns the readpreference s maxstalenessseconds optionphp mongodb driver readpreference returns the readpreference s mode optionphp mongodb driver readpreference returns the readpreference s tagsets optionphp mongodb driver server returns the hostname of this serverphp mongodb driver server returns an array of information about this serverphp mongodb driver writeconcern returns the writeconcern s journal optionphp mongodb driver writeconcern returns the writeconcern s w optionphp mongodb driver writeconcern returns the writeconcern s wtimeout optionphp mongodb driver writeconcernerror returns the writeconcernerror s error codephp mongodb driver writeresult returns an array of identifiers for upserted documentsphp mongodb driver writeresult returns any write concern error that occurredphp mongodb driver writeresult returns any write errors that occurred
关注编程学问公众号