| @@ 187-195 (lines=9) @@ | ||
| 184 | * |
|
| 185 | * @return bool |
|
| 186 | */ |
|
| 187 | protected function __multi(string $sql, array $values){ |
|
| 188 | pg_prepare($this->db, '', $this->replaceParams($sql)); |
|
| 189 | ||
| 190 | foreach($values as $row){ |
|
| 191 | pg_execute($this->db, '', $row); |
|
| 192 | } |
|
| 193 | ||
| 194 | return true; |
|
| 195 | } |
|
| 196 | ||
| 197 | /** |
|
| 198 | * @param string $sql |
|
| @@ 204-212 (lines=9) @@ | ||
| 201 | * |
|
| 202 | * @return bool |
|
| 203 | */ |
|
| 204 | protected function __multi_callback(string $sql, array $data, $callback){ |
|
| 205 | pg_prepare($this->db, '', $this->replaceParams($sql)); |
|
| 206 | ||
| 207 | foreach($data as $row){ |
|
| 208 | pg_execute($this->db, '', call_user_func_array($callback, [$row])); |
|
| 209 | } |
|
| 210 | ||
| 211 | return true; |
|
| 212 | } |
|
| 213 | ||
| 214 | /** |
|
| 215 | * @param string $sql |
|