jonas-elias/hyperf-oracle
Composer 安装命令:
composer require jonas-elias/hyperf-oracle
包简介
A oracle handler for hyperf/database.
README 文档
README
Hyperf-Oracle
Hyperf-Oracle is an Oracle Database Driver package for Hyperf. Extension of Hyperf\Database that uses pdo-oci extension to communicate with Oracle. Through integration of Swoole, Hyperf optimizes resource utilization and boosts concurrency, leading to enhanced throughput and responsiveness when interfacing with Oracle databases.
Quick Installation
composer require jonas-elias/hyperf-oracle
Example
use Hyperf\DbConnection\Db; // select Db::table('users')->get(); // insert Db::table('users')->insert(['name' => 'jonas']); // update Db::table('users')->where('id', '=', 1)->update(['name' => 'johnny']); // delete Db::table('users')->delete(1);
Environment Settings
The following environment variables should be configured to specify the connection details for the Oracle database:
DB_DRIVER=oracle DB_HOST=oracle.host DB_PORT=1521 DB_SERVICE_NAME=XE DB_SID=XE DB_USERNAME=user DB_PASSWORD=password DB_CHARSET=utf8mb4 DB_AUTO_COMMIT=false DB_TIMEZONE=America/Sao_Paulo
Configuration in Code
In your databases.php configuration file, you can set up the database connection using the following format:
return [ 'default' => [ 'driver' => env('DB_DRIVER', 'oracle'), 'host' => env('DB_HOST', 'host'), 'port' => env('DB_PORT', 1521), 'database' => env('DB_DATABASE', 'hyperf'), 'username' => env('DB_USERNAME', 'oracle'), 'service_name' => env('DB_SERVICE_NAME', 'XE'), 'sid' => env('DB_SID', 'XE'), 'auto_commit' => env('DB_AUTO_COMMIT', false), 'timezone' => env('DB_TIMEZONE', 'America/Sao_Paulo'), 'password' => env('DB_PASSWORD', 'password'), 'charset' => env('DB_CHARSET', 'utf8mb4'), 'prefix' => env('DB_PREFIX', ''), 'pool' => [ 'min_connections' => 1, 'max_connections' => 10, 'connect_timeout' => 10.0, 'wait_timeout' => 3.0, 'heartbeat' => -1, 'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60), ], 'commands' => [ 'gen:model' => [ 'path' => 'app/Model', 'force_casts' => true, 'inheritance' => 'Model', 'uses' => '', 'table_mapping' => [], ], ], ], ];
Credits
License
The MIT License (MIT). Please see License File for more information.
jonas-elias/hyperf-oracle 适用场景与选型建议
jonas-elias/hyperf-oracle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.43k 次下载、GitHub Stars 达 10, 最近一次更新时间为 2023 年 09 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「database」 「php」 「oracle」 「oci8」 「swoole」 「hyperf」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jonas-elias/hyperf-oracle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jonas-elias/hyperf-oracle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jonas-elias/hyperf-oracle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Store your language lines in the database, yaml or other sources
Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
oracle per progetti Fifree2
A PSR-7 compatible library for making CRUD API endpoints
统计信息
- 总下载量: 2.43k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-28