Skip to content

Commit 9ad0fc8

Browse files
add back parens
1 parent 41870f1 commit 9ad0fc8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/ecto/adapters/myxql/connection.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ if Code.ensure_loaded?(MyXQL) do
826826
fun,
827827
?(,
828828
modifier,
829-
Enum.map_intersperse(args, ", ", &top_level_expr(&1, sources, query)),
829+
Enum.map_intersperse(args, ", ", &expr(&1, sources, query)),
830830
?)
831831
]
832832
end

test/ecto/adapters/myxql_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ defmodule Ecto.Adapters.MyXQLTest do
478478
|> plan()
479479

480480
assert all(query) ==
481-
~s{SELECT s0.`x` FROM `schema` AS s0 ORDER BY exists(SELECT ss0.`x` AS `result` FROM `schema` AS ss0 WHERE (ss0.`x` = s0.`x`))}
481+
~s{SELECT s0.`x` FROM `schema` AS s0 ORDER BY exists((SELECT ss0.`x` AS `result` FROM `schema` AS ss0 WHERE (ss0.`x` = s0.`x`)))}
482482
end
483483

484484
test "union and union all" do
@@ -882,7 +882,7 @@ defmodule Ecto.Adapters.MyXQLTest do
882882
|> plan()
883883

884884
assert all(query) ==
885-
~s{SELECT s0.`x` FROM `schema` AS s0 GROUP BY exists(SELECT ss0.`x` AS `result` FROM `schema` AS ss0 WHERE (ss0.`x` = s0.`x`))}
885+
~s{SELECT s0.`x` FROM `schema` AS s0 GROUP BY exists((SELECT ss0.`x` AS `result` FROM `schema` AS ss0 WHERE (ss0.`x` = s0.`x`)))}
886886
end
887887

888888
test "interpolated values" do
@@ -1089,7 +1089,7 @@ defmodule Ecto.Adapters.MyXQLTest do
10891089
|> plan
10901090

10911091
assert all(query) ==
1092-
~s{SELECT s0.`x` FROM `schema` AS s0 WINDOW `w` AS (ORDER BY exists(SELECT ss0.`x` AS `result` FROM `schema` AS ss0 WHERE (ss0.`x` = s0.`x`)))}
1092+
~s{SELECT s0.`x` FROM `schema` AS s0 WINDOW `w` AS (ORDER BY exists((SELECT ss0.`x` AS `result` FROM `schema` AS ss0 WHERE (ss0.`x` = s0.`x`))))}
10931093
end
10941094

10951095
test "two windows" do

0 commit comments

Comments
 (0)