Skip to content

WIP Fix tests#1

Open
aelaa wants to merge 2 commits intoblatyo:ecto3from
aelaa:ecto3
Open

WIP Fix tests#1
aelaa wants to merge 2 commits intoblatyo:ecto3from
aelaa:ecto3

Conversation

@aelaa
Copy link

@aelaa aelaa commented May 11, 2020

Hello Allen! I was looking for ecto 3 support for 2 years (wasn't confident enough to write it myself), so I appreciate your work on it! Let me help you finish it, and I hope the maintainer of the original repo accept it. I'll push my progress here, and remove WIP tag when everything's done

@@ -546,15 +546,15 @@ if Code.ensure_loaded?(Postgrex) do
defp create_names(prefix, sources, pos, limit) when pos < limit do
current =
case elem(sources, pos) do
Copy link
Author

Choose a reason for hiding this comment

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

Very strange one. As case should work, it should match {table, schema, _alias} pattern even if there is :fragment in the beginning. That somehow worked in the original code, and had been broken after dependencies updating.

@aelaa aelaa changed the title Fix tests WIP Fix tests May 11, 2020
end

defp from(%{from: from} = query, sources) do
defp from(%{from: %Ecto.Query.FromExpr{source: from}} = query, sources) do
Copy link
Author

Choose a reason for hiding this comment

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

Ecto 3 introduced FromExpr contains source: SubQuery, unlike just SubQuery like before.

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.

1 participant