Skip to content

Instantly share code, notes, and snippets.

@Ninigi
Last active June 26, 2018 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ninigi/94c125d6ab36a0a2498cb660b99edc24 to your computer and use it in GitHub Desktop.
Save Ninigi/94c125d6ab36a0a2498cb660b99edc24 to your computer and use it in GitHub Desktop.
defmodule DripperExample.AccountUsers do
alias DripperExample.{
Repo,
Accounts,
UserQuery
}
def find_user(args) do
Accounts.User
|> UserQuery.query_username(args)
|> Repo.one()
end
end
defmodule DripperExample.UserQuery do
use EctoDripper,
composable_queries: [
[:username, :==]
]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment