承接 thecsea/mysqltcs 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

thecsea/mysqltcs

Composer 安装命令:

composer require thecsea/mysqltcs

包简介

The simplest and the most powerful library to access to a mysql database, optimizing the connections and allowing you to perform common database actions immediately and efficiently

README 文档

README

Build status: Build Status Scrutinizer Code Quality Code Coverage Build Status Latest Stable Version Total Downloads Latest Unstable Version License

The simplest and the most powerful library for mysql written in php:

  • You can use the same db connection in more than one instances (optimizing mysql physical connections)
  • This library allow you to make common database operations immediately and efficiently, returning simple data structures
  • Log all actions performed on db
  • All mysql error as exception
  • Clone support
  • Transactions support

Download, install and use

Download

via git

Clone repository

git clone https://github.com/thecsea/mysqltcs.git

via composer

download composer here https://getcomposer.org/

add the following dependence in composer.json

"thecsea/mysqltcs": "3.0.*"

or type

php composer.phar require thecsea/mysqltcs

##Install/Update Update composer (download composer here https://getcomposer.org/)

php composer.phar self-update

Followings commands must be executed in project root directory

###Install mysqltcs

php composer.phar install

###Update mysqltcs

You can perform an updated if you have added mysqltcs as composer dependency

php composer.phar update

You have to perform an update when a new version is released

##How to use

When composer installation is finished you will see vendor/autoload.php that is the auload generated by composer. If you have set mysqltcs as composer dependence the autoload loads both mysqltcs and other dependecies. So you just have to include autload in each file where you want use mysqltcs and create the mysqtcs object in the following way:

$connection = new it\thecsea\mysqltcs\Mysqltcs(...);

or

use it\thecsea\mysqltcs\Mysqltcs; and $connection = new Mysqltcs(...);

You can see examples to understand how to use library

You can also take a look to wiki to see the detailed description or go to generated phpdoc documents (documentations of all classes)

Tests

Mysqltcs is tested with automatic test: phpunit test. So we have a good chance of not having errors, but not the certainty. But we have covered the following percentage of statements with tests: Code Coverage

  • Change db data in tests/config.php
  • Import tests/mysqltcs.sql
  • Execute the unit tests:
  1. Go in the root directory
  2. Type phpunit or if you have downloaded the phar php phpunit-xxx.phar

In fact phpunit.xml contains the correct test configuration

CAUTION: each time tests are executed, the database must be in the initial state, like the import has just been executed (you should have a empty table, only the db structure)

#Examples You can find some examples under examples to run it:

  • Change db data in examples/config.php
  • Import examples/mysqltcs.sql

There is a simple example simpleExample.php that shows you how to use the library in the simplest way

There are not examples about transactions yet (you have to remember to set autocommit to true after using transactions)

N.B. if you have added mysqltcs as composer dependency you will find example under vendor/thecsea/mysqltcs/examples

By thecsea.it

thecsea/mysqltcs 适用场景与选型建议

thecsea/mysqltcs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 255 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 06 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 thecsea/mysqltcs 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2015-06-03