Skip to content

Commit

Permalink
post rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
v0idpwn committed Dec 24, 2024
1 parent b1bee2a commit 22af118
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
4 changes: 2 additions & 2 deletions lib/ecto/embedded.ex
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ defmodule Ecto.Embedded do

{:embed, %{virtual: true}} ->
acc
end)
end
end
end)
end

defp prepare_each(%{cardinality: :one}, nil, _adapter, _repo, _repo_action) do
Expand Down
18 changes: 4 additions & 14 deletions test/ecto/query/planner_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,8 @@ defmodule Ecto.Query.PlannerTest do

test "plan: generates a cache key" do
{_query, _cast_params, _dump_params, key} = plan(from(Post, []))
assert key == [:all, {:from, {"posts", Post, 23210922, "my_prefix"}, []}]

assert key == [:all, {:from, {"posts", Post, 132715331, "my_prefix"}, []}]

query =
from(
Expand All @@ -622,7 +623,6 @@ defmodule Ecto.Query.PlannerTest do
)

{_query, _cast_params, _dump_params, key} = plan(%{query | prefix: "foo"})
<<<<<<< HEAD

assert key == [
:all,
Expand All @@ -634,19 +634,9 @@ defmodule Ecto.Query.PlannerTest do
[
{:inner, {"comments", Comment, 38_292_156, "world"}, true, ["join hint"]}
]},
{:from, {"posts", Post, 50_009_106, "hello"}, ["hint"]},
{:from, {"posts", Post, 132715331, "hello"}, ["hint"]},
{:select, 1}
]
=======
assert key == [:all,
{:lock, "foo"},
{:prefix, "foo"},
{:limit, {true, 1}},
{:where, [{:and, {:is_nil, [], [nil]}}, {:or, {:is_nil, [], [nil]}}]},
{:join, [{:inner, {"comments", Comment, 38292156, "world"}, true, ["join hint"]}]},
{:from, {"posts", Post, 23210922, "hello"}, ["hint"]},
{:select, 1}]
>>>>>>> e779c5c7 (Fix tests)
end

test "plan: generates a cache key for in based on the adapter" do
Expand Down Expand Up @@ -966,7 +956,7 @@ defmodule Ecto.Query.PlannerTest do
[
:all,
{:aliases, %{post: 0}},
{:from, {"posts", Ecto.Query.PlannerTest.Post, 50_009_106, "my_prefix"}, []},
{:from, {"posts", Ecto.Query.PlannerTest.Post, 132715331, "my_prefix"}, []},
{:select,
{{:%{}, [],
[
Expand Down

0 comments on commit 22af118

Please sign in to comment.