Download the PHP package guiqibusixin/hyper-database-ext without Composer
On this page you can find all versions of the php package guiqibusixin/hyper-database-ext. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package hyper-database-ext
简介
这是一个关于hyperf框架ORM操作的扩展包,支持Transactional注解、replace和onDuplicateKey等操作。后面会支持 case when语法,比如case when语法批量更新操作。
运行环境
- php 8+
- hyperf 2.2.~
安装
在抽象数据库模型中 use ModelBuilderExtensionTrait
,主要是替换原生的模型构造器。
使用
Transactional注解
简介
使用注解来开启一个事务,自动回滚
在非数据库模型类中(普通的类,一般是service层)
在数据库模型类中
和非数据库模型类中唯一的区别是:数据库模型类中注解的默认连接是当前模型连接
replace
和insert语法一致
insert on duplicate key
All versions of hyper-database-ext with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.0
hyperf/database Version ~2.2.0
hyperf/di Version ~2.2.0
hyperf/contract Version ~2.2.0
hyperf/utils Version ~2.2.0
hyperf/database Version ~2.2.0
hyperf/di Version ~2.2.0
hyperf/contract Version ~2.2.0
hyperf/utils Version ~2.2.0
The package guiqibusixin/hyper-database-ext contains the following files
Loading the files please wait ....