模式¶
PostgreSQL数据库模型类
| 属性 | 值 |
|---|---|
| 命名空间 | fize\db\realization\pgsql |
| 类名 | Mode |
| 实现接口 | fize\db\definition\Mode |
| 方法: |
|---|
| 方法名 | 说明 |
|---|---|
| odbc() | odbc方式构造 |
| pgsql() | pgsql方式构造 |
| pdo() | Pdo方式构造 |
| getInstance() | 数据库实例 |
方法¶
odbc()¶
odbc方式构造
public static function odbc (
string $host,
string $user,
string $pwd,
string $dbname,
string|int $port = "",
string $driver = null
) : \fize\db\realization\pgsql\mode\Odbc
| 参数: |
|
|---|
pgsql()¶
pgsql方式构造
public static function pgsql (
string $connection_string,
bool $pconnect = false,
int $connect_type = null
) : \fize\db\realization\pgsql\mode\Pgsql
| 参数: |
|
|---|
pdo()¶
Pdo方式构造
public static function pdo (
string $host,
string $user,
string $pwd,
string $dbname,
int $port = null,
array $opts = []
) : \fize\db\realization\pgsql\mode\Pdo
| 参数: |
|
|---|
getInstance()¶
数据库实例
public static function getInstance (
string $mode,
array $config
) : \fize\db\realization\pgsql\Db
| 参数: |
|
|---|