Skip to content

Commit 519084b

Browse files
committed
Added
- MySQL::transactionStart() - MySQL::transactionCommit() - MySQL::transactionRollback()
1 parent b69fae0 commit 519084b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/Kir/MySQL/Databases/MySQL.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,25 @@ public function update() {
168168
public function delete() {
169169
return new Builder\RunnableDelete($this);
170170
}
171+
172+
/**
173+
* @return $this
174+
*/
175+
public function transactionStart() {
176+
$this->exec('BEGIN;');
177+
}
178+
179+
/**
180+
* @return $this
181+
*/
182+
public function transactionCommit() {
183+
$this->exec('COMMIT;');
184+
}
185+
186+
/**
187+
* @return $this
188+
*/
189+
public function transactionRollback() {
190+
$this->exec('ROLLBACK;');
191+
}
171192
}

0 commit comments

Comments
 (0)