Created
October 15, 2019 21:29
-
-
Save nietaki/ee667bd5dcc8124d5947f229cee22fdb 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
alias BlogExample.Schema.Comment | |
import Ecto.Query, only: [from: 2] | |
query = | |
from(c in Comment, | |
where: c.user_id == ^charlie_id | |
) | |
comments_by_charlie = Repo.all(query) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment