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