public function commit()
    {
        try {
            $this->storeAllTables();

            $this->snapshot = [];
        } catch (\Exception $e) {
            throw new \RuntimeException('Commit failed: ' . $e->getMessage(), 0, $e);
        }
    }