2017 © Pedro Peláez
 

library mysql

Asynchronous MySQL client for PHP based on Amp.

image

amphp/mysql

Asynchronous MySQL client for PHP based on Amp.

  • Thursday, June 28, 2018
  • by bwoebi
  • Repository
  • 19 Watchers
  • 133 Stars
  • 2,554 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 34 Forks
  • 7 Open issues
  • 19 Versions
  • 29 % Grown

The README.md

mysql , (*1)

Build Status Code Coverage Release License , (*2)

Async MySQL client built with Amp., (*3)


amphp/mysql is an asynchronous MySQL client built on the Amp concurrency framework. The library exposes a Promise-based API to dynamically query multiple MySQL connections concurrently. The client transparently distributes these queries across a scalable pool of available connections and does so using 100% userland PHP; there are no external extension dependencies (e.g. ext/mysqli, ext/pdo, etc)., (*4)

Features

  • Asynchronous API exposing full single-threaded concurrency
  • Transparent connection pooling to overcome MySQL's fundamentally synchronous connection protocol
  • MySQL transfer encoding support (gzip, TLS encryption)
  • Support for all MySQL commands

† As documented in official Mysql Internals Manual, (*5)

Project Goals

  • Expose a non-blocking API for issuing multiple MySQL queries in parallel
  • Support the full MySQL protocol and all available commands asynchronously

Installation

This package can be installed as a Composer dependency., (*6)

composer require amphp/mysql

Requirements

Documentation & Examples

More extensive code examples reside in the examples directory., (*7)

Amp\Loop::run(function() {
    $config = Amp\Mysql\ConnectionConfig::fromString(
        "host=127.0.0.1 user=username password=password db=test"
    );

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

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

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

Versioning

amphp/mysql follows the semver semantic versioning specification like all other amphp packages., (*8)

Security

If you discover any security related issues, please email contact@amphp.org instead of using the issue tracker., (*9)

License

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

The Versions

28/06 2018

dev-master

9999999-dev

Asynchronous MySQL client for PHP based on Amp.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bob Weinand
by Aaron Piotrowski

26/03 2018

dev-travis

dev-travis

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bob Weinand
by Aaron Piotrowski

15/12 2017

v0.3.1

0.3.1.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Bob Weinand
by Aaron Piotrowski

11/12 2017

v0.3.0

0.3.0.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand
by Aaron Piotrowski

23/11 2017

dev-mariadb

dev-mariadb

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand
by Aaron Piotrowski

26/10 2017

dev-refactor

dev-refactor

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

16/10 2017

v0.2.3

0.2.3.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

21/09 2017

v0.2.2

0.2.2.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

21/09 2017

v0.2.1

0.2.1.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

31/07 2017

v0.2.0

0.2.0.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

07/07 2017

0.1.x-dev

0.1.9999999.9999999-dev

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

07/07 2017

v0.1.6

0.1.6.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

05/07 2017

dev-amp_v2

dev-amp_v2

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

07/04 2017

v0.1.5

0.1.5.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

16/10 2016

v0.1.4

0.1.4.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

20/04 2016

v0.1.3

0.1.3.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

06/04 2016

v0.1.2

0.1.2.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

06/04 2016

v0.1.1

0.1.1.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand

07/11 2015

v0.1.0

0.1.0.0

Asynchronous parallel Mysql client built on the Amp concurrency framework

  Sources   Download

The Requires

 

The Development Requires

by Bob Weinand