2017 © Pedro Peláez
 

library react-mysql

Asynchronous & non-blocking MySQL driver for React.PHP

image

khr/react-mysql

Asynchronous & non-blocking MySQL driver for React.PHP

  • Wednesday, April 22, 2015
  • by khristenkoyura
  • Repository
  • 1 Watchers
  • 8 Stars
  • 490 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 17 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

AsyncMysql

Asynchronous & non-blocking MySQL driver for React.PHP., (*1)

Install

Add this crap to your composer.json:, (*2)

{
  "require": {
    "khr/react-mysql": "*"
  }
}

Usage

Create instance of AsyncMysql and call method query. It returns Promise of mysqli_result that will be resolved imediately after query completes., (*3)

<?php

$loop = React\EventLoop\Factory::create();

$makeConnection = function () {
  return mysqli_connect('localhost', 'user', 'pass', 'dbname');
};

$mysql = new \KHR\React\Mysql\Client($loop, new \KHR\React\Mysql\Pool(function(){
    return mysqli_connect('127.0.0.1', 'root', '', 'test');
}, 10));
$mysql->query('select * from ponies_and_unicorns')->then(
  function ($result) { writeHttpResponse(json_encode($result->all())); },
  function ($error)  { writeHeader500(); }
);

The Versions

22/04 2015

dev-master

9999999-dev

Asynchronous & non-blocking MySQL driver for React.PHP

  Sources   Download

None

The Requires

 

by Yura

11/04 2015

v0.0.6

0.0.6.0

Asynchronous & non-blocking MySQL driver for React.PHP

  Sources   Download

None

The Requires

 

by Yura

11/04 2015

v0.0.4

0.0.4.0

Asynchronous & non-blocking MySQL driver for React.PHP

  Sources   Download

None

The Requires

 

by Yura

11/04 2015

v0.0.5

0.0.5.0

Asynchronous & non-blocking MySQL driver for React.PHP

  Sources   Download

None

The Requires

 

by Yura

11/04 2015

v0.0.3

0.0.3.0

Asynchronous & non-blocking MySQL driver for React.PHP

  Sources   Download

None

The Requires

 

by Yura

11/04 2015

v0.0.2

0.0.2.0

Asynchronous & non-blocking MySQL driver for React.PHP

  Sources   Download

None

The Requires

 

by Yura

11/04 2015

v0.0.1

0.0.1.0

Asynchronous & non-blocking MySQL driver for React.PHP

  Sources   Download

None

The Requires

 

by Yura