Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ConnectionConfig
✓ use Amp\Postgres\ConnectionConfig;
Connect to PostgreSQL and execute an async query
use Amp\Postgres\ConnectionConfig;
use Amp\Postgres\Pool;
$config = ConnectionConfig::fromString('host=localhost port=5432 user=postgres password=secret dbname=test');
$pool = new Pool($config);
$result = yield $pool->query('SELECT * FROM users');
while (yield $result->advance()) {
$row = $result->getCurrent();
echo $row['name'] . "\n";
}
Audit
Dependencies
No dependency data recorded yet.