justim/access
最新稳定版本:v1.22.5
Composer 安装命令:
composer require justim/access
包简介
A simple MySQL wrapper optimized for bigger data sets
README 文档
README
A simple MySQL wrapper optimized for bigger data sets
Quick usage
class User extends Entity { // .. } $db = Database::create('some PDO connection string'); $user = $db->findOne(User::class, 1); $user->setName('Dave'); $db->update($user); $users = $db->findBy(User::class, ['name' => 'Dave']); // uses a generator foreach ($users as $user) { // $user is an instance of User }
Features
- Uses a PDO prepared statement pool for faster queries
- Optimized for bulk queries (ie. easy to fetch collections of collections)
- Easily present your entities as JSON without worrying about n+1 queries
Requirements
- PHP 8.1, or higher
- PDO extension
Installation
- Available at Packagist
composer require justim/access=dev-master
Docs
For now, see the tests for usage.
Nice to have
- For now only MySQL and SQLite is supported, it would be nice to have support for more RDMSs, like Postgres
- Tests are currently run with an in-memory SQLite database, a MySQL database would be better
Final notes
Currently used in a single production product, features are tied to this product.
统计信息
- 总下载量: 3.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-06-04