yii\mongodb\Query::exists PHP 메소드

exists() 공개 메소드

Returns a value indicating whether the query result contains any row of data.
public exists ( Connection $db = null ) : boolean
$db Connection the Mongo connection used to execute the query. If this parameter is not given, the `mongodb` application component will be used.
리턴 boolean whether the query result contains any row of data.
    public function exists($db = null)
    {
        return $this->one($db) !== false;
    }