public function transaction(callable $closure)
    {
        $this->start();
        try {
            $result = $closure();
        } catch (\Throwable $e) {
            $this->rollback();
            throw $e;
        }
        $this->commit();

        return $result;
    }