public function commit() { if ($this->transactionCount < 1) { return; } $transaction = $this->unprepared('COMMIT;'); if ($transaction) { $this->transactionCount--; } }