Skip to content

Commit a027b19

Browse files
committed
also assert valid joins in using join/4
1 parent 7bfc25b commit a027b19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ecto/adapters/sqlite3/connection.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,8 @@ defmodule Ecto.Adapters.SQLite3.Connection do
993993
defp using_join(%{joins: joins} = query, _kind, prefix, sources) do
994994
froms =
995995
Enum.map_intersperse(joins, ", ", fn
996-
%JoinExpr{qual: _qual, ix: ix, source: source} ->
996+
%JoinExpr{qual: _qual, ix: ix, source: source} = join ->
997+
assert_valid_join(join, query)
997998
{join, name} = get_source(query, sources, ix, source)
998999
[join, " AS " | name]
9991000
end)

0 commit comments

Comments
 (0)