1 | <?php |
||
20 | class PostgreSQLDriver extends DBDriverAbstract{ |
||
21 | |||
22 | /** |
||
23 | * Holds the database resource object |
||
24 | * |
||
25 | * @var resource |
||
26 | */ |
||
27 | protected $db; |
||
28 | |||
29 | /** |
||
30 | * Establishes a database connection and returns the connection object |
||
31 | * |
||
32 | * @return \chillerlan\Database\Drivers\DBDriverInterface |
||
33 | * @throws \chillerlan\Database\DBException |
||
34 | */ |
||
35 | public function connect():DBDriverInterface{ |
||
66 | |||
67 | /** |
||
68 | * Closes a database connection |
||
69 | * |
||
70 | * @return bool |
||
71 | */ |
||
72 | public function disconnect():bool{ |
||
75 | |||
76 | /** |
||
77 | * Returns info about the used php client |
||
78 | * |
||
79 | * @return string php's database client string |
||
80 | */ |
||
81 | public function getClientInfo():string{ |
||
86 | |||
87 | /** |
||
88 | * Returns info about the database server |
||
89 | * |
||
90 | * @return string database's serverinfo string |
||
91 | */ |
||
92 | public function getServerInfo():string{ |
||
97 | |||
98 | /** |
||
99 | * @param $data |
||
100 | * |
||
101 | * @return string |
||
102 | */ |
||
103 | public function escape($data){ |
||
106 | |||
107 | /** |
||
108 | * @param $result |
||
109 | * @param string|null $index |
||
110 | * @param bool $assoc |
||
111 | * |
||
112 | * @return bool|\chillerlan\Database\DBResult |
||
113 | */ |
||
114 | protected function __getResult($result, string $index = null, bool $assoc = true){ |
||
126 | |||
127 | /** |
||
128 | * @param string $sql |
||
129 | * @param string|null $index |
||
130 | * @param bool $assoc |
||
131 | * |
||
132 | * @return bool|\chillerlan\Database\DBResult |
||
133 | */ |
||
134 | protected function __raw(string $sql, string $index = null, bool $assoc = true){ |
||
137 | |||
138 | /** |
||
139 | * @param string $sql |
||
140 | * @param array $values |
||
141 | * @param string|null $index |
||
142 | * @param bool $assoc |
||
143 | * |
||
144 | * @return bool|\chillerlan\Database\DBResult |
||
145 | */ |
||
146 | protected function __prepared(string $sql, array $values = [], string $index = null, bool $assoc = true){ |
||
151 | |||
152 | /** |
||
153 | * @param string $sql |
||
154 | * @param array $values |
||
155 | * |
||
156 | * @return bool |
||
157 | */ |
||
158 | protected function __multi(string $sql, array $values){ |
||
167 | |||
168 | /** |
||
169 | * @param string $sql |
||
170 | * @param array $data |
||
171 | * @param $callback |
||
172 | * |
||
173 | * @return bool |
||
174 | */ |
||
175 | protected function __multi_callback(string $sql, array $data, $callback){ |
||
184 | |||
185 | } |
||
186 |