mirror of
https://github.com/danog/postgres.git
synced 2024-11-30 04:29:12 +01:00
Update for Amp changes
Listener → StreamIterator Promise\map() removed
This commit is contained in:
parent
e8e3ea7f7b
commit
c11beb79a2
@ -2,9 +2,9 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\{ Listener as StreamListener, Promise, Stream };
|
||||
use Amp\{ Promise, Stream, StreamIterator };
|
||||
|
||||
class Listener extends StreamListener implements Operation {
|
||||
class Listener extends StreamIterator implements Operation {
|
||||
use Internal\Operation;
|
||||
|
||||
/** @var string */
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
namespace Amp\Postgres;
|
||||
|
||||
use Amp\Listener;
|
||||
use Amp\StreamIterator;
|
||||
|
||||
abstract class TupleResult extends Listener implements Result {
|
||||
abstract class TupleResult extends StreamIterator implements Result {
|
||||
/**
|
||||
* Returns the number of fields (columns) in each row.
|
||||
*
|
||||
|
@ -173,9 +173,11 @@ abstract class AbstractPoolTest extends \PHPUnit_Framework_TestCase {
|
||||
for ($i = 0; $i < $count * $rounds; ++$i) {
|
||||
$promises[] = $pool->transaction(Transaction::COMMITTED);
|
||||
}
|
||||
|
||||
yield Promise\all(Promise\map(function (Transaction $transaction) {
|
||||
return $transaction->rollback();
|
||||
|
||||
yield Promise\all(\array_map(function (Promise $promise) {
|
||||
return Promise\pipe($promise, function (Transaction $transaction) {
|
||||
return $transaction->rollback();
|
||||
});
|
||||
}, $promises));
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user