Registry / database / react-mysql

react-mysql

JSON →
library0.6.0phppackagistunverified

Async MySQL database client for ReactPHP.

composer require react/mysql
INSTALL
IMPORT
SIG · REACT-MYSQL
R
react-mysql
databasephpv0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ConnectionInterface
use React\MySQL\ConnectionInterface;

Create an async MySQL connection and run a query.

use React\MySQL\ConnectionInterface; $loop = React\EventLoop\Loop::get(); $factory = new React\MySQL\Factory($loop); $connection = $factory->createLazyConnection('user:pass@localhost/db'); $connection->query('SELECT * FROM users')->then(function (QueryResult $result) { var_dump($result->resultRows); }); $loop->run();
Debug
Known issues
breakingRequires PHP 7.4+ and ReactPHP event loop
fix
Ensure PHP version >= 7.4 and install react/event-loop
affects: >=0.6.0
Upgrade
Version history
0.6.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
30
Amazon
1
Resources
react-mysql — pip install react-mysql · libregistry