Created
January 2, 2018 21:40
-
-
Save weixiyen/e70ce50a1cd0648026542604b2e194aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
User | |
|> prepared(user_id: id) | |
|> select([:user_id, :username]) | |
|> where(user_id: :user_id) | |
|> User.one | |
User | |
|> select([:user_id, :username]) | |
|> where(user_id: [in: [1, 2, 3]]) | |
|> limit(10) | |
|> User.all | |
UserByEmail | |
|> select([:display_name]) | |
|> where(email: "[email protected]") | |
|> User.one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment