You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind.
4
+
`amphp/postgres` is an asynchronous Postgres client.
5
+
The library implements concurrent querying by transparently distributing queries across a scalable pool of available connections. Either [ext-pgsql](https://secure.php.net/pgsql) (bundled with PHP) or [pecl-pq](https://pecl.php.net/package/pq) are required.
11
6
12
-
<palign="center"><strong>Async PostgreSQL client for PHP built with <ahref="https://amphp.org/">Amp</a>.</strong></p>
7
+
## Features
8
+
9
+
- Exposes a non-blocking API for issuing multiple Postgres queries concurrently
- Nested transactions with commit and rollback event hooks
13
+
- Unbuffered results to reduce memory usage for large result sets
14
+
- Support for sending and receiving notifications
13
15
14
16
## Installation
15
17
@@ -21,7 +23,7 @@ composer require amphp/postgres
21
23
22
24
## Requirements
23
25
24
-
- PHP 7.1+
26
+
- PHP 8.1+
25
27
-[ext-pgsql](https://secure.php.net/pgsql) or [pecl-pq](https://pecl.php.net/package/pq)
26
28
27
29
Note: [pecl-ev](https://pecl.php.net/package/ev) is not compatible with ext-pgsql. If you wish to use pecl-ev for the event loop backend, you must use pecl-pq.
@@ -30,30 +32,24 @@ Note: [pecl-ev](https://pecl.php.net/package/ev) is not compatible with ext-pgsq
30
32
31
33
Prepared statements and parameterized queries support named placeholders, as well as `?` and standard numeric (i.e. `$1`) placeholders.
32
34
35
+
Row values are cast to their corresponding PHP types. For example, integer columns will be an `int` in the result row array.
36
+
33
37
More examples can be found in the [`examples`](examples) directory.
0 commit comments