Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support selecting into structs #1947

Merged
merged 1 commit into from Feb 14, 2017
Merged

Support selecting into structs #1947

merged 1 commit into from Feb 14, 2017

Conversation

michalmuskala
Copy link
Member

@michalmuskala michalmuskala commented Feb 13, 2017

This enables queries like from(c in City, select: %Data{name: c.name}) to work, which might be especially interesting in case of complex joins or schemaless queries.

@sourcelevel-bot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 3 possible new issues (including those that may have been commented here).
  • 3 fixed issues! 🎉

But beware that this branch is 12 commits behind the elixir-ecto:master branch, and a review of an up to date branch would produce more accurate results.

You can see more details about this review at https://ebertapp.io/github/elixir-ecto/ecto/pulls/1947.

@@ -892,6 +892,8 @@ defmodule Ecto.Integration.RepoTest do

## Query syntax

defstruct [:title]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's please define a module because this is a bit "lost" in the middle of the file.

@josevalim
Copy link
Member

Just one tiny comment and this is good to go!

@michalmuskala
Copy link
Member Author

@josevalim updated

@josevalim josevalim merged commit 9ad38bd into master Feb 14, 2017
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

@josevalim josevalim deleted the mm/select-struct branch February 14, 2017 00:01
bartekupartek pushed a commit to bartekupartek/ecto that referenced this pull request Mar 19, 2019
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.

None yet

2 participants