PHPackages                             thruster/mysql-client - 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. thruster/mysql-client

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

thruster/mysql-client
=====================

Thruster MysqlClient Component

0.3.0(10y ago)082MITPHP &gt;=7.0

Since May 31Compare

[ Source](https://github.com/ThrusterIO/mysql-client)[ Packagist](https://packagist.org/packages/thruster/mysql-client)[ Docs](https://thruster.io)[ RSS](/packages/thruster-mysql-client/feed)WikiDiscussions Synced today

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

MysqlClient Component
=====================

[](#mysqlclient-component)

\[[![Latest Version](https://camo.githubusercontent.com/642cba77fb253244562011dca59969d8612cf3e94b241ea29c3eed45dfdba0ed/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f5468727573746572494f2f6d7973716c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/642cba77fb253244562011dca59969d8612cf3e94b241ea29c3eed45dfdba0ed/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f5468727573746572494f2f6d7973716c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)\] () \[[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)\] (LICENSE) \[[![Build Status](https://camo.githubusercontent.com/e67268a667797d49663a5e9216234dc46ce5801f604037a0a78d30c8feaae330/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f5468727573746572494f2f6d7973716c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/e67268a667797d49663a5e9216234dc46ce5801f604037a0a78d30c8feaae330/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f5468727573746572494f2f6d7973716c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)\] () \[[![Code Coverage](https://camo.githubusercontent.com/41f371f98e05b2085e5b0dec62c228a32efe107a4d2c36ddb8849d9fe1591fcb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f5468727573746572494f2f6d7973716c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/41f371f98e05b2085e5b0dec62c228a32efe107a4d2c36ddb8849d9fe1591fcb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f5468727573746572494f2f6d7973716c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)\] () \[[![Quality Score](https://camo.githubusercontent.com/77a89dadcd8cc4988a637baf997297686ec22aac70a0182d3f530096eb8fdeb8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f5468727573746572494f2f6d7973716c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/77a89dadcd8cc4988a637baf997297686ec22aac70a0182d3f530096eb8fdeb8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f5468727573746572494f2f6d7973716c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)\] () \[[![Total Downloads](https://camo.githubusercontent.com/349ab15c6a117a61ae08b62728062eec52cca169c95aff08ca838685ee9b61c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74687275737465722f6d7973716c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/349ab15c6a117a61ae08b62728062eec52cca169c95aff08ca838685ee9b61c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74687275737465722f6d7973716c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)\] ()

\[[![Email](https://camo.githubusercontent.com/fc4998410b6b71d697bf556c37294970fedc130c081c82698cdb5ca22d70cade/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f656d61696c2d7465616d4074687275737465722e696f2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/fc4998410b6b71d697bf556c37294970fedc130c081c82698cdb5ca22d70cade/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f656d61696c2d7465616d4074687275737465722e696f2d626c75652e7376673f7374796c653d666c61742d737175617265)\] ()

The Thruster MysqlClient Component.

Install
-------

[](#install)

Via Composer

```
$ composer require thruster/mysql-client
```

Usage
-----

[](#usage)

```
use Thruster\Component\MysqlClient\Client;
use Thruster\Component\MysqlClient\ConnectionPool;
use Thruster\Component\EventLoop\EventLoop;

$loop = new EventLoop();

$connectionPool = new ConnectionPool(function () {
    return new mysqli('127.0.0.1', 'root', '', 'timeverz');
});

$client = new Client($loop, $connectionPool);

for ($i = 0; $i < 100; $i++) {
    $client->query('SELECT * FROM users;')->then(
        function (\mysqli_result $result) use ($i) {
            foreach ($result->fetch_all(MYSQLI_ASSOC) as $item) {
                echo $i . ': ' . $item['id'] . PHP_EOL;
            }
        },
        function ($error) {
            // TODO: Handle error
        }
    );
}

$loop->run();
```

Result:

```
0: 1
0: 2
1: 1
1: 2
3: 1
3: 2
7: 1
7: 2
15: 1
15: 2
31: 1
31: 2
63: 1
63: 2
64: 1
64: 2
32: 1
32: 2
65: 1
65: 2
66: 1
66: 2
16: 1
16: 2
33: 1
33: 2
67: 1
67: 2
68: 1
68: 2
34: 1
34: 2
69: 1
69: 2
70: 1
70: 2
8: 1
8: 2
17: 1
17: 2
35: 1
35: 2
71: 1
71: 2
72: 1
72: 2
36: 1
36: 2
73: 1
73: 2
74: 1
74: 2
18: 1
18: 2
37: 1
37: 2
75: 1
75: 2
76: 1
76: 2
38: 1
38: 2
77: 1
77: 2
78: 1
78: 2
4: 1
4: 2
9: 1
9: 2
19: 1
19: 2
39: 1
39: 2
79: 1
79: 2
80: 1
80: 2
40: 1
40: 2
81: 1
81: 2
82: 1
82: 2
20: 1
20: 2
41: 1
41: 2
83: 1
83: 2
84: 1
84: 2
42: 1
42: 2
85: 1
85: 2
86: 1
86: 2
10: 1
10: 2
21: 1
21: 2
43: 1
43: 2
87: 1
87: 2
88: 1
88: 2
44: 1
44: 2
89: 1
89: 2
90: 1
90: 2
22: 1
22: 2
45: 1
45: 2
91: 1
91: 2
92: 1
92: 2
46: 1
46: 2
93: 1
93: 2
94: 1
94: 2
2: 1
2: 2
5: 1
5: 2
11: 1
11: 2
23: 1
23: 2
47: 1
47: 2
95: 1
95: 2
96: 1
96: 2
48: 1
48: 2
97: 1
97: 2
98: 1
98: 2
24: 1
24: 2
49: 1
49: 2
99: 1
99: 2
50: 1
50: 2
12: 1
12: 2
25: 1
25: 2
51: 1
51: 2
52: 1
52: 2
26: 1
26: 2
53: 1
53: 2
54: 1
54: 2
6: 1
6: 2
13: 1
13: 2
27: 1
27: 2
55: 1
55: 2
56: 1
56: 2
28: 1
28: 2
57: 1
57: 2
58: 1
58: 2
14: 1
14: 2
29: 1
29: 2
59: 1
59: 2
60: 1
60: 2
30: 1
30: 2
61: 1
61: 2
62: 1
62: 2

```

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

License
-------

[](#license)

Please see [License File](LICENSE) for more information.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

3680d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/770bae1f46ac2b4536db820b8642491c25e2e2fd44e761110269e4722679a80d?d=identicon)[aurimasniekis](/maintainers/aurimasniekis)

---

Tags

mysql clientthruster

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thruster-mysql-client/health.svg)

```
[![Health](https://phpackages.com/badges/thruster-mysql-client/health.svg)](https://phpackages.com/packages/thruster-mysql-client)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)

PHPackages © 2026

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