thruster/mysql-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thruster/mysql-client

Composer 安装命令:

composer require thruster/mysql-client

包简介

Thruster MysqlClient Component

README 文档

README

[Latest Version] (https://github.com/ThrusterIO/mysql-client/releases) [Software License] (LICENSE) [Build Status] (https://travis-ci.org/ThrusterIO/mysql-client) [Code Coverage] (https://scrutinizer-ci.com/g/ThrusterIO/mysql-client) [Quality Score] (https://scrutinizer-ci.com/g/ThrusterIO/mysql-client) [Total Downloads] (https://packagist.org/packages/thruster/mysql-client)

[Email] (mailto:team@thruster.io)

The Thruster MysqlClient Component.

Install

Via Composer

$ composer require thruster/mysql-client

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

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

License

Please see License File for more information.

thruster/mysql-client 适用场景与选型建议

thruster/mysql-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 82 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 05 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「thruster」 「mysql-client」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 thruster/mysql-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 thruster/mysql-client 我们能提供哪些服务?
定制开发 / 二次开发

基于 thruster/mysql-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 82
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-31