jackfinal / hyperf-database-dm
hyperf/database 的 dm 驱动程序。
dev-main
2024-06-25 02:00 UTC
Requires
- php: >=8.1
- hyperf/database: ^3.1
- hyperf/db-connection: ^3.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^10.0
- swoole/ide-helper: dev-master
Suggests
- swow/swow: Required to create swow components.
This package is not auto-updated.
Last update: 2024-09-17 02:58:09 UTC
README
hyperf-database-dm
hyperf-database-dm 是一个为 Hyperf 提供的 Dm 数据库驱动程序包。hyperf-database-dm 是 Hyperf/Database 的扩展,它使用 DM 扩展与 Dm 进行通信。感谢 @yajra。
文档
- 您可以在以下位置找到用户友好且更新的文档:Hyperf-database-dm 文档
- 关于 dm 和 php 的所有信息:地下 PHP 和 Dm 手册
Hyperf 版本兼容性
| Hyperf | 包 |
|---|---|
| 3.1.x | 3.1.x |
快速安装
composer require jackfinal/hyperf-database-dm
配置(可选)
您可以在
.env文件中设置连接数据
DB_DRIVER=dm
DB_HOST=192.168.45.132
DB_PORT=5236
DB_USERNAME=jack
DB_PASSWORD=1234
然后运行您的 Hyperf 安装...
注意
您可以使用 $table->identity($column, $start = 1, $step = 1) 来替换 $table->bigIncrements('id'); 增量 ID(主键)。
Schema::create('users', function (Blueprint $table) {
$table->identity('id', 1, 1);
$table->primary('id');
$table->datetimes();
$table->softDeletes();
$table->comment('Table Comment');
$table->mediumText('description');
$table->string('name', 100);
$table->text('content');
});
许可证
MIT 许可证(MIT)。有关更多信息,请参阅许可证文件。