@@ 61-72 (lines=12) @@ | ||
58 | * |
|
59 | * @return bool|\PDOStatement |
|
60 | */ |
|
61 | public function query($query) |
|
62 | { |
|
63 | try { |
|
64 | return parent::query($query); |
|
65 | } catch (PDOException $e) { |
|
66 | if ('HY000' !== $e->getCode()) { |
|
67 | throw $e; |
|
68 | } |
|
69 | $this->reconnect(); |
|
70 | ||
71 | return parent::query($query); |
|
72 | } |
|
73 | } |
|
74 | ||
75 | /** |
|
@@ 80-91 (lines=12) @@ | ||
77 | * |
|
78 | * @return bool|\PDOStatement |
|
79 | */ |
|
80 | public function exec($query) |
|
81 | { |
|
82 | try { |
|
83 | return parent::exec($query); |
|
84 | } catch (PDOException $e) { |
|
85 | if ('HY000' !== $e->getCode()) { |
|
86 | throw $e; |
|
87 | } |
|
88 | $this->reconnect(); |
|
89 | ||
90 | return parent::exec($query); |
|
91 | } |
|
92 | } |
|
93 | ||
94 | public function has($table, $join, $where = null) |