PHPackages                             dazzle-php/pgsql - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. dazzle-php/pgsql

ActiveLibrary[Database &amp; ORM](/categories/database)

dazzle-php/pgsql
================

Dazzle Asynchronous PgSQL.

3442PHP

Since Aug 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/dazzle-php/pgsql)[ Packagist](https://packagist.org/packages/dazzle-php/pgsql)[ RSS](/packages/dazzle-php-pgsql/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Dazzle Async PgSQL Driver
=========================

[](#dazzle-async-pgsql-driver)

[![Build Status](https://camo.githubusercontent.com/9251aaee0a26be736e16486df7da8363275e1f5432c079cad362d6496f41504b/68747470733a2f2f7472617669732d63692e6f72672f64617a7a6c652d7068702f706773716c2e737667)](https://travis-ci.org/dazzle-php/pgsql)[![Code Coverage](https://camo.githubusercontent.com/4d07939849104146477420248170080f4119a24be391bc1c16988db1a313268b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64617a7a6c652d7068702f706773716c2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dazzle-php/pgsql/?branch=master)[![Code Quality](https://camo.githubusercontent.com/ddeea8c0765f143589288912511a8bfa74c6734bae0851cf11c3c415a9ebe913/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64617a7a6c652d7068702f706773716c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dazzle-php/pgsql/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/e4790ab20db4edff4f8b078f99e0017b4ef1e12bc4c3875450bc115c18f70488/68747470733a2f2f706f7365722e707567782e6f72672f64617a7a6c652d7068702f706773716c2f762f737461626c65)](https://packagist.org/packages/dazzle-php/pgsql)[![Latest Unstable Version](https://camo.githubusercontent.com/354fe1939d6d1b0a052b0c81b7ce540fbb301cb9499a974642ccbd3fff2c4361/68747470733a2f2f706f7365722e707567782e6f72672f64617a7a6c652d7068702f706773716c2f762f756e737461626c65)](https://packagist.org/packages/dazzle-php/pgsql)[![License](https://camo.githubusercontent.com/24512373daaffc0da7cf4ebaa4e2de7a558958482d130bd9d48d9c6357dd0894/68747470733a2f2f706f7365722e707567782e6f72672f64617a7a6c652d7068702f706773716c2f6c6963656e7365)](https://packagist.org/packages/dazzle-php/pgsql/license)

> **Note:** This repository is part of [Dazzle Project](https://github.com/dazzle-php/dazzle) - the next-gen library for PHP. The project's purpose is to provide PHP developers with a set of complete tools to build functional async applications. Please, make sure you read the attached README carefully and it is guaranteed you will be surprised how easy to use and powerful it is. In the meantime, you might want to check out the rest of our async libraries in [Dazzle repository](https://github.com/dazzle-php) for the full extent of Dazzle experience.

[![](https://raw.githubusercontent.com/dazzle-php/dazzle/master/media/dazzle-x125.png)](https://raw.githubusercontent.com/dazzle-php/dazzle/master/media/dazzle-x125.png)

Description
-----------

[](#description)

TODO

Feature Highlights
------------------

[](#feature-highlights)

Dazzle PgSQL features:

TODO

Provided Example(s)
-------------------

[](#provided-examples)

### Quickstart

[](#quickstart)

This example demonstrates how to connect to PgSQL database and print all tables stored inside it.

```
$loop = new Loop(new SelectLoop);

$mysql = new Database($loop, [
    'endpoint' => 'tcp://127.0.0.1:3306',
    'user'     => 'root',
    'pass'     => 'root',
    'dbname'   => 'dazzle',
]);

$mysql
    ->start()
    ->then(function() use($mysql) {
        printf("Connection has been established!\n");
        printf("Connection state is %s\n", $mysql->getState());
    })
    ->done(null, function($ex) {
        printf("Error: %s\n", var_export((string) $ex, true));
    });

$mysql->query('SHOW TABLES')
    ->then(function ($command) use ($loop) {
        $results = $command->resultRows;
        $fields  = $command->resultFields;

        printf("|%-60s|\n", str_repeat('-', 60));
        printf("|%-60s|\n", ' ' . $fields[0]['name']);
        printf("|%-60s|\n", str_repeat('-', 60));

        foreach ($results as $result)
        {
            printf("| # %-56s |\n", $result[$fields[0]['name']]);
        }
        printf("|%-60s|\n", str_repeat('-', 60));
    })
    ->then(null, function($ex) {
        printf("Error: %s\n", var_export((string) $ex, true));
    })
    ->done(function() use($loop) {
        $loop->stop();
    });

$loop->start();
```

### Additional

[](#additional)

TODO

Comparison
----------

[](#comparison)

This section contains Dazzle vs React comparison many users requested. If you are wondering why this section has been created, see the [author's note](https://github.com/dazzle-php/pgsql/blob/master/NOTE.md) at the end of it.

#### Performance

[](#performance)

TODO

#### Details

[](#details)

TODO

#### Note from the author

[](#note-from-the-author)

Note is available in [NOTE file](https://github.com/dazzle-php/pgsql/blob/master/NOTE.md).

Requirements
------------

[](#requirements)

Dazzle PgSQL requires:

- PHP-5.6 or PHP-7.0+,
- UNIX or Windows OS.

Installation
------------

[](#installation)

To install this library make sure you have [composer](https://getcomposer.org/) installed, then run following command:

```
$> composer require dazzle-php/pgsql

```

Tests
-----

[](#tests)

Tests can be run via:

```
$> vendor/bin/phpunit -d memory_limit=1024M

```

Versioning
----------

[](#versioning)

Versioning of Dazzle libraries is being shared between all packages included in [Dazzle Project](https://github.com/dazzle-php/dazzle). That means the releases are being made concurrently for all of them. On one hand this might lead to "empty" releases for some packages at times, but don't worry. In the end it is far much easier for contributors to maintain and -- what's the most important -- much more straight-forward for users to understand the compatibility and inter-operability of the packages.

Contributing
------------

[](#contributing)

Thank you for considering contributing to this repository!

- The contribution guide can be found in the [contribution tips](https://github.com/dazzle-php/pgsql/blob/master/CONTRIBUTING.md).
- Open tickets can be found in [issues section](https://github.com/dazzle-php/pgsql/issues).
- Current contributors are listed in [graphs section](https://github.com/dazzle-php/pgsql/graphs/contributors)
- To contact the author(s) see the information attached in [composer.json](https://github.com/dazzle-php/pgsql/blob/master/composer.json) file.

License
-------

[](#license)

Dazzle PgSQL is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

---

*"Everything is possible. The impossible just takes longer."* ― Dan Brown

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/edd40f7be77d3f9934f998dc0859d0562e42c715d61f5139feaf948a2fcb6050?d=identicon)[khelle](/maintainers/khelle)

---

Top Contributors

[![khelle](https://avatars.githubusercontent.com/u/5642657?v=4)](https://github.com/khelle "khelle (3 commits)")

---

Tags

asyncdatabasedazzlepgsqlphpphp-libphp7postgressqlstorage

### Embed Badge

![Health badge](/badges/dazzle-php-pgsql/health.svg)

```
[![Health](https://phpackages.com/badges/dazzle-php-pgsql/health.svg)](https://phpackages.com/packages/dazzle-php-pgsql)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
