| @@ 21-32 (lines=12) @@ | ||
| 18 | $this->dsn = $dsn; |
|
| 19 | } |
|
| 20 | ||
| 21 | public function query($query) |
|
| 22 | { |
|
| 23 | $this->initialize(); |
|
| 24 | ||
| 25 | try { |
|
| 26 | $stmt = $this->pdo->query($query); |
|
| 27 | } catch (\PDOException $e) { |
|
| 28 | throw new ConnectionException($e->getMessage(), 0, $e); |
|
| 29 | } |
|
| 30 | ||
| 31 | return $stmt->fetchAll(\PDO::FETCH_ASSOC); |
|
| 32 | } |
|
| 33 | ||
| 34 | public function multiQuery($query, array $resultSetNames = array()) |
|
| 35 | { |
|
| @@ 55-64 (lines=10) @@ | ||
| 52 | return $results; |
|
| 53 | } |
|
| 54 | ||
| 55 | public function exec($query) |
|
| 56 | { |
|
| 57 | $this->initialize(); |
|
| 58 | ||
| 59 | try { |
|
| 60 | return $this->pdo->exec($query); |
|
| 61 | } catch (\PDOException $e) { |
|
| 62 | throw new ConnectionException($e->getMessage(), 0, $e); |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| 66 | public function quote($value) |
|
| 67 | { |
|