public function one($db = null)
    {
        if ($this->emulateExecution) {
            return new LazyPromise(function() { return reject(null); });
        }

        return $this->createCommand($db)->queryOne();
    }
public function one($db = null)
    {
        if ($this->emulateExecution) {
            return new LazyPromise(function() { return reject(null); });
        }

        return $this->createCommand($db)->queryOne();
    }
public function one ( $ db = null ) { if ( $ this -> emulateExecution ) { return new LazyPromise ( function ( ) { return reject ( null ) ; } ) ; } return $ this -> createCommand ( $ db ) -> queryOne ( ) ; }
Executes the query and returns a single row of result.
@param DatabaseInterface|DbConnectionGetterInterface $db the database connection used to generate the SQL statement.
If this parameter is not given, the `db` application component will be used.
@return LazyPromiseInterface with array the first row (in terms of an array) of the query result. Rejects if the query
results in nothing.
Executes the query and returns a single row of result .