mirror of
https://github.com/danog/postgres.git
synced 2024-11-30 04:29:12 +01:00
Move PooledStatement to Internal namespace
This commit is contained in:
parent
6e3f1ac40d
commit
9269fe5a96
@ -1,8 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Amp\Postgres;
|
||||
namespace Amp\Postgres\Internal;
|
||||
|
||||
use Amp\Loop;
|
||||
use Amp\Postgres\Operation;
|
||||
use Amp\Postgres\Pool;
|
||||
use Amp\Postgres\Statement;
|
||||
use Amp\Promise;
|
||||
use function Amp\call;
|
||||
|
@ -321,11 +321,13 @@ final class Pool implements Link {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* Prepared statements returned by this method will stay alive as long as the pool remains open.
|
||||
*/
|
||||
public function prepare(string $sql): Promise {
|
||||
return call(function () use ($sql) {
|
||||
$statement = yield from $this->doPrepare($sql);
|
||||
return new PooledStatement($this, $statement, $this->prepare);
|
||||
return new Internal\PooledStatement($this, $statement, $this->prepare);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ use Amp\Delayed;
|
||||
use Amp\Loop;
|
||||
use Amp\PHPUnit\TestCase;
|
||||
use Amp\Postgres\Pool;
|
||||
use Amp\Postgres\PooledStatement;
|
||||
use Amp\Postgres\Internal\PooledStatement;
|
||||
use Amp\Postgres\ResultSet;
|
||||
use Amp\Postgres\Statement;
|
||||
use Amp\Success;
|
||||
|
Loading…
Reference in New Issue
Block a user