定制 makise-co/postgres-spiral-driver 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

makise-co/postgres-spiral-driver

Composer 安装命令:

composer require makise-co/postgres-spiral-driver

包简介

Makise-Co Postgres client adapter for Spiral DBAL

README 文档

README

MakiseCo PostgreSQL client adapter for Spiral DBAL

WARNING: This driver could be used only in the Coroutine context

Usage:

<?php

declare(strict_types=1);

use Spiral\Database;

$dbConfig = new Database\Config\DatabaseConfig([
    'default'     => 'default',
    'databases'   => [
        'default' => [
            'connection' => 'pgsql'
        ]
    ],
    'connections' => [
        'pgsql' => [
            'driver'  => \MakiseCo\Database\Driver\MakisePostgres\PooledMakisePostgresDriver::class,
            'options' => [
                'host' => '127.0.0.1',
                'port' => 5432,
                'username' => 'makise',
                'password' => 'el-psy-congroo',
                'database' => 'makise',
                // or 'connection' => 'host=127.0.0.1;dbname=makise',
                'schema' => ['public'],
                'timezone' => 'UTC',
                'charset' => 'utf8',
                'application_name' => 'MakiseCo Framework',
                
                'connector' => \MakiseCo\Postgres\Driver\Pq\PqConnector::class,
                'connect_timeout' => 0, // float, connection attempt timeout in seconds (0 means no timeout)

                // connection pool configuration
                'poolMinActive' => 0, // The minimum number of established connections that should be kept in the pool at all times
                'poolMaxActive' => 2, // The maximum number of active connections that can be allocated from this pool at the same time
                'poolMaxWaitTime' => 5.0, // The maximum number of seconds that can be awaited for a free connection from the pool
                'poolMaxIdleTime' => 30, // The minimum amount of time (seconds) a connection may sit idle in the pool before it is eligible for closing
                'poolValidationInterval' => 15.0, // The number of seconds to sleep between runs of the idle connection validation/cleaner timer
            ]
        ]
    ]
]);

$dbal = new Database\DatabaseManager($dbConfig);

统计信息

  • 总下载量: 413
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 1

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-08-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固