2016-12-30 06:21:17 +01:00
|
|
|
<?php
|
2016-09-14 16:27:39 +02:00
|
|
|
|
|
|
|
namespace Amp\Postgres;
|
2017-05-16 06:28:37 +02:00
|
|
|
|
2016-09-14 16:27:39 +02:00
|
|
|
use pq;
|
|
|
|
|
|
|
|
class PqCommandResult implements CommandResult {
|
|
|
|
/** @var \pq\Result PostgreSQL result object. */
|
|
|
|
private $result;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param \pq\Result $result PostgreSQL result object.
|
|
|
|
*/
|
|
|
|
public function __construct(pq\Result $result) {
|
|
|
|
$this->result = $result;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int Number of rows affected by the INSERT, UPDATE, or DELETE query.
|
|
|
|
*/
|
|
|
|
public function affectedRows(): int {
|
|
|
|
return $this->result->affectedRows;
|
|
|
|
}
|
2017-02-16 06:33:41 +01:00
|
|
|
}
|