1 | <?php |
||
11 | class Postgres extends AbstractType |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * (non-PHPdoc) |
||
16 | * |
||
17 | * @see \Nkey\Caribu\Type\IType::getDsn() |
||
18 | */ |
||
19 | 3 | public function getDsn(): string |
|
20 | { |
||
21 | // From the docs: |
||
22 | // return "pgsql:host={host};port={port};dbname={schema};user={user};password={password}"; |
||
23 | 3 | return "pgsql:host={host};port={port};dbname={schema}"; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * (non-PHPdoc) |
||
28 | * |
||
29 | * @see \Nkey\Caribu\Type\IType::getDefaultPort() |
||
30 | */ |
||
31 | 3 | public function getDefaultPort(): int |
|
35 | |||
36 | /** |
||
37 | * (non-PHPdoc) |
||
38 | * |
||
39 | * @see \Nkey\Caribu\Type\IType::getPrimaryKeyColumn() |
||
40 | */ |
||
41 | 1 | public function getPrimaryKeyColumn(string $table, \Nkey\Caribu\Orm\Orm $orm): string |
|
47 | |||
48 | /** |
||
49 | * (non-PHPdoc) |
||
50 | * |
||
51 | * @see \Nkey\Caribu\Type\IType::lock() |
||
52 | */ |
||
53 | 3 | public function lock(string $table, int $lockType, \Nkey\Caribu\Orm\Orm $orm) |
|
64 | |||
65 | /** |
||
66 | * (non-PHPdoc) |
||
67 | * |
||
68 | * @see \Nkey\Caribu\Type\IType::unlock() |
||
69 | */ |
||
70 | 3 | public function unlock(string $table, \Nkey\Caribu\Orm\Orm $orm) |
|
74 | |||
75 | /** |
||
76 | * (non-PHPdoc) |
||
77 | * |
||
78 | * @see \Nkey\Caribu\Type\IType::getEscapeSign() |
||
79 | */ |
||
80 | 3 | public function getEscapeSign(): string |
|
84 | |||
85 | /** |
||
86 | * (non-PHPdoc) |
||
87 | * |
||
88 | * @see \Nkey\Caribu\Type\AbstractType::getTypeQuery() |
||
89 | */ |
||
90 | 2 | protected function getTypeQuery(): string |
|
96 | |||
97 | /** |
||
98 | * (non-PHPdoc) |
||
99 | * |
||
100 | * @see \Nkey\Caribu\Type\AbstractType::mapType() |
||
101 | */ |
||
102 | 2 | protected function mapType(array $result): int |
|
132 | |||
133 | /** |
||
134 | * (non-PHPdoc) |
||
135 | * |
||
136 | * @see \Nkey\Caribu\Type\IType::getSequenceNameForColumn() |
||
137 | */ |
||
138 | 2 | public function getSequenceNameForColumn(string $table, string $columnName, \Nkey\Caribu\Orm\Orm $orm): string |
|
174 | } |
||
175 |