index.community/backend/lib/backend/elasticsearch/store.ex

18 lines
306 B
Elixir

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