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{ |
||
62 | |||
63 | /** |
||
64 | * Closes a database connection |
||
65 | * |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function disconnect():bool{ |
||
71 | |||
72 | /** |
||
73 | * Returns info about the used php client |
||
74 | * |
||
75 | * @return string php's database client string |
||
76 | */ |
||
77 | public function getClientInfo():string{ |
||
82 | |||
83 | /** |
||
84 | * Returns info about the database server |
||
85 | * |
||
86 | * @return string database's serverinfo string |
||
87 | */ |
||
88 | public function getServerInfo():string{ |
||
93 | |||
94 | /** |
||
95 | * @param $data |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | protected function __escape($data){ |
||
102 | |||
103 | /** |
||
104 | * @param $result |
||
105 | * @param string|null $index |
||
106 | * @param bool $assoc |
||
107 | * |
||
108 | * @return bool|\chillerlan\Database\DBResult |
||
109 | */ |
||
110 | protected function __getResult($result, string $index = null, bool $assoc = true){ |
||
122 | |||
123 | /** |
||
124 | * @param string $sql |
||
125 | * @param string|null $index |
||
126 | * @param bool $assoc |
||
127 | * |
||
128 | * @return bool|\chillerlan\Database\DBResult |
||
129 | */ |
||
130 | protected function __raw(string $sql, string $index = null, bool $assoc = true){ |
||
133 | |||
134 | /** |
||
135 | * @param string $sql |
||
136 | * @param array $values |
||
137 | * @param string|null $index |
||
138 | * @param bool $assoc |
||
139 | * |
||
140 | * @return bool|\chillerlan\Database\DBResult |
||
141 | */ |
||
142 | protected function __prepared(string $sql, array $values = [], string $index = null, bool $assoc = true){ |
||
147 | |||
148 | /** |
||
149 | * @param string $sql |
||
150 | * @param array $values |
||
151 | * |
||
152 | * @return bool |
||
153 | */ |
||
154 | protected function __multi(string $sql, array $values){ |
||
163 | |||
164 | /** |
||
165 | * @param string $sql |
||
166 | * @param array $data |
||
167 | * @param $callback |
||
168 | * |
||
169 | * @return bool |
||
170 | */ |
||
171 | protected function __multi_callback(string $sql, array $data, $callback){ |
||
180 | |||
181 | } |
||
182 |