1
0
mirror of https://github.com/danog/postgres.git synced 2024-12-03 09:57:48 +01:00

Remove unused classes

This commit is contained in:
Aaron Piotrowski 2020-05-22 18:26:43 -05:00
parent a1ce998070
commit 1e0355cf4c
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB
2 changed files with 0 additions and 63 deletions

View File

@ -1,35 +0,0 @@
<?php
namespace Amp\Postgres;
use Amp\Sql\CommandResult;
final class PgSqlCommandResult implements CommandResult
{
/** @var resource PostgreSQL result resource. */
private $handle;
/**
* @param resource $handle PostgreSQL result resource.
*/
public function __construct($handle)
{
$this->handle = $handle;
}
/**
* Frees the result resource.
*/
public function __destruct()
{
\pg_free_result($this->handle);
}
/**
* @return int Number of rows affected by the INSERT, UPDATE, or DELETE query.
*/
public function getAffectedRowCount(): int
{
return \pg_affected_rows($this->handle);
}
}

View File

@ -1,28 +0,0 @@
<?php
namespace Amp\Postgres;
use Amp\Sql\Result;
use pq;
final class PqCommandResult implements Result
{
/** @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 getAffectedRowCount(): int
{
return $this->result->affectedRows;
}
}