@@ 113-126 (lines=14) @@ | ||
110 | * @throws Oci8Exception |
|
111 | * @return bool TRUE on success or FALSE on failure. |
|
112 | */ |
|
113 | public function commit() |
|
114 | { |
|
115 | if (!$this->inTransaction()) { |
|
116 | throw new Oci8Exception('There is no active transaction'); |
|
117 | } |
|
118 | ||
119 | if (oci_commit($this->dbh)) { |
|
120 | $this->inTransaction = false; |
|
121 | ||
122 | return true; |
|
123 | } |
|
124 | ||
125 | return false; |
|
126 | } |
|
127 | ||
128 | /** |
|
129 | * Rolls back a transaction |
|
@@ 134-147 (lines=14) @@ | ||
131 | * @throws Oci8Exception |
|
132 | * @return bool TRUE on success or FALSE on failure. |
|
133 | */ |
|
134 | public function rollBack() |
|
135 | { |
|
136 | if (!$this->inTransaction()) { |
|
137 | throw new Oci8Exception('There is no active transaction'); |
|
138 | } |
|
139 | ||
140 | if (oci_rollback($this->dbh)) { |
|
141 | $this->inTransaction = false; |
|
142 | ||
143 | return true; |
|
144 | } |
|
145 | ||
146 | return false; |
|
147 | } |
|
148 | ||
149 | /** |
|
150 | * Sets an attribute on the database handle |