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

17 lines
287 B
Elixir
Raw Normal View History

2019-07-26 22:30:11 +00:00
defmodule Backend.Elasticsearch.Store do
@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