Download the PHP package swoft-laravel-x1024/database2 without Composer
On this page you can find all versions of the php package swoft-laravel-x1024/database2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download swoft-laravel-x1024/database2
More information about swoft-laravel-x1024/database2
Files in swoft-laravel-x1024/database2
Download swoft-laravel-x1024/database2
More information about swoft-laravel-x1024/database2
Files in swoft-laravel-x1024/database2
Vendor swoft-laravel-x1024
Package database2
Short Description laravel orm database in swoft
License MIT
Package database2
Short Description laravel orm database in swoft
License MIT
Please rate this library. Is it a good library?
Informations about the package database2
swoft-laravel-x1024/database2
集成 laravel orm 组件至 swoft
forked from swoft-laravel-database
php >7.2, swoole > 4.0.3, swoft > v2.x
技术细节
- 技术目标:
- 独立使用 laravel database, 文档和使用方式参考lavarl 社区文档
- 在不扩大代码量的情况下,尽可能地迁移 laravel database 的功能: QueryBuilder, Model, ORM, 配置项
- 支持swoole Coroutine\MySQL 异步客户端
- 支持coroutine mysql连接池
- 实现
- 代码部分主要参照 官方文档 ,在它的基础之上,整合laravel database数据库配置加载方式
- 参考 database 本身的mysql driver实现,对Coroutine\MySQL的相关调用做了一层代理封装, 使其可以与复用mysql driver部分的代码
安装
在composer.json require 中添加如依赖
更新依赖
在根目录下新建文件 config\database.php
如果需要使用 swoole 异步客户端,需要绑定命名空间下的事件监听器
初始化连接
连接生命周期结束则自动回收
忽略异常注释
使用
All versions of database2 with dependencies
PHP Build Version
Package Version
Requires
swoft/framework Version
~2.0.0
illuminate/database Version ~5.7.2
illuminate/config Version ~5.7.2
illuminate/database Version ~5.7.2
illuminate/config Version ~5.7.2
The package swoft-laravel-x1024/database2 contains the following files
Loading the files please wait ....