All Projects → amphp → Postgres

amphp / Postgres

Licence: mit
Async Postgres client for PHP based on Amp.

Projects that are alternatives of or similar to Postgres

Sqlx
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.
Stars: ✭ 5,039 (+8898.21%)
Mutual labels:  async, postgresql, postgres
Dbdpg
Perl Postgres driver DBD::Pg aka dbdpg
Stars: ✭ 38 (-32.14%)
Mutual labels:  postgresql, postgres
Fullstack Apollo Express Postgresql Boilerplate
💥 A sophisticated GraphQL with Apollo, Express and PostgreSQL boilerplate project.
Stars: ✭ 1,079 (+1826.79%)
Mutual labels:  postgresql, postgres
Ar Uuid
Override migration methods to support UUID columns without having to be explicit about it.
Stars: ✭ 41 (-26.79%)
Mutual labels:  postgresql, postgres
Zeeql3
The ZeeQL (EOF/CoreData/AR like) Database Toolkit for Swift
Stars: ✭ 29 (-48.21%)
Mutual labels:  postgresql, postgres
Pgwatch2
PostgreSQL metrics monitor/dashboard
Stars: ✭ 960 (+1614.29%)
Mutual labels:  postgresql, postgres
Toro
Multithreaded message processing on Postgres
Stars: ✭ 39 (-30.36%)
Mutual labels:  postgresql, postgres
Monogamy
Add table-level database locking to ActiveRecord
Stars: ✭ 12 (-78.57%)
Mutual labels:  postgresql, postgres
Pg variables
Session wide variables for PostgreSQL
Stars: ✭ 44 (-21.43%)
Mutual labels:  postgresql, postgres
Barman
Barman - Backup and Recovery Manager for PostgreSQL
Stars: ✭ 1,044 (+1764.29%)
Mutual labels:  postgresql, postgres
Scala Db Codegen
Scala code/boilerplate generator from a db schema
Stars: ✭ 49 (-12.5%)
Mutual labels:  postgresql, postgres
Kotgres
SQL generator and result set mapper for Postgres and Kotlin
Stars: ✭ 21 (-62.5%)
Mutual labels:  postgresql, postgres
Guardian auth
The Guardian Authentication Implementation Using Ecto/Postgresql Elixir Phoenix [ User Authentication ]
Stars: ✭ 15 (-73.21%)
Mutual labels:  postgresql, postgres
Goqu
SQL builder and query library for golang
Stars: ✭ 984 (+1657.14%)
Mutual labels:  postgresql, postgres
Awesome Postgres
A curated list of awesome PostgreSQL software, libraries, tools and resources, inspired by awesome-mysql
Stars: ✭ 7,468 (+13235.71%)
Mutual labels:  postgresql, postgres
Niklick
Rails Versioned API solution template for hipsters! (Ruby, Ruby on Rails, REST API, GraphQL, Docker, RSpec, Devise, Postgress DB)
Stars: ✭ 39 (-30.36%)
Mutual labels:  postgresql, postgres
Rust Webapp Starter
Rust single page webapp written in actix-web with vuejs.
Stars: ✭ 56 (+0%)
Mutual labels:  async, postgresql
Node Pg Migrate
Node.js database migration management for Postgresql
Stars: ✭ 838 (+1396.43%)
Mutual labels:  postgresql, postgres
Go Kallax
Kallax is a PostgreSQL typesafe ORM for the Go language.
Stars: ✭ 853 (+1423.21%)
Mutual labels:  postgresql, postgres
Pgtools
Gui application to monitor postgres database events in real time
Stars: ✭ 42 (-25%)
Mutual labels:  postgresql, postgres

postgres

Build Status Code Coverage Release License

Async PostgreSQL client built with Amp.

Installation

This package can be installed as a Composer dependency.

composer require amphp/postgres

Requirements

Note: pecl-ev is not compatible with ext-pgsql. If you wish to use pecl-ev for the event loop backend, you must use pecl-pq.

Documentation & Examples

Prepared statements and parameterized queries support named placeholders, as well as ? and standard numeric (i.e. $1) placeholders.

More examples can be found in the examples directory.

use Amp\Postgres;
use Amp\Postgres\ConnectionConfig;
use Amp\Sql\Statement;

Amp\Loop::run(function () {
    $config = ConnectionConfig::fromString("host=localhost user=postgres db=test");

    /** @var Postgres\Pool $pool */
    $pool = Postgres\pool($config);

    /** @var Statement $statement */
    $statement = yield $pool->prepare("SELECT * FROM test WHERE id = :id");

    /** @var Postgres\ResultSet $result */
    $result = yield $statement->execute(['id' => 1337]);
    while (yield $result->advance()) {
        $row = $result->getCurrent();
        // $row is an array (map) of column values. e.g.: $row['column_name']
    }
});

Versioning

amphp/postgres follows the semver semantic versioning specification like all other amphp packages.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].