/**
  * @param \mysqli_result|bool $result
  * @param int $affectedRows
  * @param int $insertId
  * @param int $errorCode
  * @param string $errorMessage
  * @param string $query
  */
 public function __construct($result, $affectedRows, $insertId, $errorCode, $errorMessage, $query = null)
 {
     $this->affectedRows = $affectedRows;
     $this->insertId = $insertId;
     $this->query = $query;
     parent::__construct($result, $errorCode == 0 ? -1 : $errorCode, $errorMessage);
 }
 /**
  * Initializes the SQLite3 Driver Result object.
  *
  * @param mixed $result
  * @param int $affectedRows
  * @param int $insertId
  * @param int $errorCode
  * @param string $errorMessage
  * @param string $query
  */
 public function __construct($result, $affectedRows, $insertId, $errorCode, $errorMessage, $query)
 {
     $this->affectedRows = $affectedRows;
     $this->insertId = $insertId;
     $this->query = $query;
     $this->currentOffset = 0;
     parent::__construct($result, $errorCode, $errorMessage);
 }
 /**
  * Initializes the Mock Driver Result with results and information.
  *
  * @param array|bool $result Either an array (containing child arrays that will act as rows [column name => value]).
  *                           It can also be a boolean, where false indicates that the query was not successful and
  *                           true is for UPDATE, INSERT, REPLACE and DELETE commands being successful.
  * @param int $affectedRows The number of rows affected by the query.
  * @param int $insertId The last generated ID.
  * @param int $errorCode The error code.
  * @param string $errorMessage The error message.
  * @param array $queryOptions The array of query options.
  */
 public function __construct($result, $affectedRows = 0, $insertId = 0, $errorCode = -1, $errorMessage = null, array $queryOptions = array())
 {
     $this->affectedRows = $affectedRows;
     $this->insertId = $insertId;
     $this->queryOptions = $queryOptions;
     // Set up our index range.
     $this->currentIndex = 0;
     $this->maxIndex = is_array($result) ? count($result) - 1 : 0;
     parent::__construct($result, $errorCode, $errorMessage);
 }