formal/access-layer
最新稳定版本:5.2.0
Composer 安装命令:
composer require formal/access-layer
包简介
README 文档
README
This a simple abstraction layer on top of builtin \PDO class to offer a minimalist api.
The goal is separate expression of queries and their execution by using immutable structures and eliminating states wherever possible.
Important
you must use vimeo/psalm to make sure you use this library correctly.
Installation
composer require formal/access-layer
Example
use Formal\AccessLayer\{ Connection\Lazy, Connection\PDO, Query\SQL, Row, }; use Innmind\Url\Url; use Innmind\Immutable\Sequence; $connection = Lazy::of(static fn() => PDO::of(Url::of('mysql://user:pwd@127.0.0.1:3306/database_name'))); $rows = $connection(SQL::of('SELECT * FROM `some_table`')); $rows; // instanceof Sequence<Row>
Documentation
Complete documentation can be found at http://formal-php.github.io/access-layer/.
统计信息
- 总下载量: 49.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-11