hyperf/database-pgsql-incubator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hyperf/database-pgsql-incubator

最新稳定版本:v0.1.2

Composer 安装命令:

composer require hyperf/database-pgsql-incubator

包简介

A pgsql handler for hyperf/database.

README 文档

README

安装

hyperf/database 组件版本必须大于等于 v2.2.26

composer require hyperf/database-pgsql-incubator 

配置

修改 autoload/database.php 配置

<?php return [ 'pgsql' => [ 'driver' => 'pgsql', 'host' => '127.0.0.1', 'database' => 'hyperf', 'port' => 5435, 'username' => 'postgres', 'password' => "", 'charset' => env('DB_CHARSET', 'utf8'), 'collation' => env('DB_COLLATION', 'utf8_unicode_ci'), 'prefix' => '', 'schema' => 'public', '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' => false, 'inheritance' => 'Model', 'refresh_fillable' => true ], ], ], 'pgsql-swoole' => [ 'driver' => 'pgsql-swoole', 'host' => '127.0.0.1', 'database' => 'hyperf', 'port' => 5435, 'username' => 'postgres', 'password' => "", 'charset' => env('DB_CHARSET', 'utf8'), 'collation' => env('DB_COLLATION', 'utf8_unicode_ci'), 'prefix' => '', 'schema' => 'public', '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' => false, 'inheritance' => 'Model', 'refresh_fillable' => true ], ], ], ];

使用

目前增删改查orm,支持了pdo_pgsql和swoole/ext-postgresql双支持,由driver区分。迁移功能目前仅支持pdo,请注意配置和你的驱动是否安装

统计信息

  • 总下载量: 29k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 4
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固