hubert/avocado-postgres-driver

Avocado 的 PostgreSQL 驱动实现

v1.0.0 2023-02-03 16:28 UTC

This package is auto-updated.

Last update: 2024-09-30 01:52:17 UTC


README

基于 PDOPDO_PSQLAvocado 8.0.0-dev 构建。

使用示例

#[Configuration]
class DataSourceConfiguration {

    public function __construct(){}

    #[Leaf]
    public function dataSource(): DataSource {
        return (new DataSourceBuilder())
            ->server("...")
            ->databaseName("...")
            ->username("...")
            ->password("...")
            ->port("...")
            ->charset("...")
            ->driver(PostgreSQLDriver::class)
            ->build();
    }
}