public function commit(): bool {
        if ($this->transactionExists) {
            $commited = $this->pdo->commit();
            $this->transactionExists = !$commited;
            return $commited;
        }
        return false;
    }