jhyperf/pgsql

hyperf pgsql database compoent

v1.0.3 2020-09-27 18:02 UTC

This package is not auto-updated.

Last update: 2024-04-17 19:44:01 UTC


README

| hyperf 框架pgsql插件

  • 1.通过composer安装
composer require jhyperf/pgsql

  • 2.自动配置
php bin/hyperf.php vendor:publish jhyperf/pgsql

  • 3.修改ENV配置
PGSQL_USERNAME=
PGSQL_PASSWORD=
PGSQL_HOST=
PGSQL_PORT=
PGSQL_DB=hyperf
PGSQL_MAX_IDLE_TIME=60

  • 4.使用示例
    /**
     * @Inject()
     * @var Pgsql
     */
    protected $pgsql;

    $this-pgsql->fetch("select * from company;",[]);