Registry / database / amphp-postgres

amphp-postgres

JSON →
library2.2.1phppackagistunverified

Asynchronous PostgreSQL client for Amp.

composer require amphp/postgres
INSTALL
IMPORT
SIG · AMPHP-POSTGRES
A
amphp-postgres
databasephpv2.2.1
harness data pending
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"; }
Debug
Known issues
breakingRequires amphp/amp and ext-pgsql
fix
Install amphp/amp and ensure ext-pgsql is enabled
affects: >=2.0.0
Upgrade
Version history
2.2.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
28
OpenAI (training)
1
Resources
amphp-postgres — pip install amphp-postgres · libregistry