Last active
June 26, 2018 10:29
-
-
Save Ninigi/94c125d6ab36a0a2498cb660b99edc24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule DripperExample.AccountUsers do | |
alias DripperExample.{ | |
Repo, | |
Accounts, | |
UserQuery | |
} | |
def find_user(args) do | |
Accounts.User | |
|> UserQuery.query_username(args) | |
|> Repo.one() | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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