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:
parent
a1ce998070
commit
1e0355cf4c
@ -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);
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user