| @@ 78-85 (lines=8) @@ | ||
| 75 | * |
|
| 76 | * @throws SQLAnywhereException |
|
| 77 | */ |
|
| 78 | public function beginTransaction() |
|
| 79 | { |
|
| 80 | if ( ! sasql_set_option($this->connection, 'auto_commit', 'off')) { |
|
| 81 | throw SQLAnywhereException::fromSQLAnywhereError($this->connection); |
|
| 82 | } |
|
| 83 | ||
| 84 | return true; |
|
| 85 | } |
|
| 86 | ||
| 87 | /** |
|
| 88 | * {@inheritdoc} |
|
| @@ 215-222 (lines=8) @@ | ||
| 212 | * |
|
| 213 | * @return boolean Whether or not ending transactional mode succeeded. |
|
| 214 | */ |
|
| 215 | private function endTransaction() |
|
| 216 | { |
|
| 217 | if ( ! sasql_set_option($this->connection, 'auto_commit', 'on')) { |
|
| 218 | throw SQLAnywhereException::fromSQLAnywhereError($this->connection); |
|
| 219 | } |
|
| 220 | ||
| 221 | return true; |
|
| 222 | } |
|
| 223 | } |
|
| 224 | ||