defmodule Backend.Elasticsearch.Store do
  @moduledoc false
  @behaviour Elasticsearch.Store

  alias Backend.Repo

  @impl true
  def stream(schema) do
    Repo.stream(schema)
  end

  @impl true
  def transaction(fun) do
    {:ok, result} = Repo.transaction(fun, timeout: :infinity)
    result
  end
end
