squirrelphp / connection
针对数据库查询和事务的简化版连接接口,支持MySQL、MariaDB、PostgreSQL和SQLite。
v0.2
2024-08-25 16:07 UTC
Requires
- php: >=8.2
- ext-pdo: *
Requires (Dev)
- captainhook/captainhook-phar: ^5.0
- captainhook/hook-installer: ^1.0
- mockery/mockery: ^1.0
- phpunit/phpunit: ^11.0
- squirrelphp/types: ^1.0
- symfony/finder: ^7.0
- symfony/process: ^7.0
Suggests
- squirrelphp/entities: Makes defining typed entities possible and easy
- squirrelphp/entities-bundle: Automatic integration of squirrelphp/entities in Symfony
- squirrelphp/queries: Symfony integration of squirrelphp/queries - automatic assembling of decorated connections
- squirrelphp/queries-bundle: Symfony integration of squirrelphp/queries - automatic assembling of decorated connections
This package is auto-updated.
Last update: 2024-08-25 17:22:15 UTC
README
为底层数据库连接(ConnectionInterface)提供简化版的简洁接口,作为Doctrine DBAL的一个更简单的替代品,以及与纯PDO相比更简洁/有意见的接口。它支持MySQL、MariaDB、Sqlite和PostgreSQL,目前基于PDO,但这被视为实现细节。
异常处理的大部分代码来自Doctrine DBAL。这个库目前仅在 squirrelphp/queries 内部使用,不应单独使用,因为API尚不稳定。请使用 squirrelphp/queries 或者更好的选择是使用 squirrelphp/entities / squirrelphp/entities-bundle,因为它们更高级且更稳定。
一旦对API表面进行更多思考并且在这个包的其它SquirrelPHP包中有更多使用经验,这个包将最终推出一个稳定版本。