Skip to content

Conversation

@steffkes
Copy link
Contributor

just to give a new user an idea of what load/3 would actually look like, i've copied the test code to the README

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.487% when pulling a5c8352 on steffkes:steffkes-patch-2 into ce904e5 on infinitered:master.

@steffkes
Copy link
Contributor Author

@danielberkompas anything else you need before this will get merged?

@danielberkompas
Copy link
Owner

@steffkes This isn't actually the example I would use. I would show an Ecto-based store, which is what most people will need.

defmodule MyApp.ElasticsearchStore do
  @behaviour Elasticsearch.Store

  import Ecto.Query
  
  alias MyApp.Repo

  def load(schema, offset, limit) do
     schema
     |> offset(^offset)
     |> limit(^limit)
     |> Repo.all()
  end
end

@steffkes
Copy link
Contributor Author

i'm not using ecto, so the example we had in the tests before were perfect, either way .. more concrete examples are always helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants