Skip to content

Commit

Permalink
also assert valid joins in using join/4
Browse files Browse the repository at this point in the history
  • Loading branch information
aseigo committed Nov 20, 2024
1 parent 7bfc25b commit a027b19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ecto/adapters/sqlite3/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,8 @@ defmodule Ecto.Adapters.SQLite3.Connection do
defp using_join(%{joins: joins} = query, _kind, prefix, sources) do
froms =
Enum.map_intersperse(joins, ", ", fn
%JoinExpr{qual: _qual, ix: ix, source: source} ->
%JoinExpr{qual: _qual, ix: ix, source: source} = join ->
assert_valid_join(join, query)
{join, name} = get_source(query, sources, ix, source)
[join, " AS " | name]
end)
Expand Down

0 comments on commit a027b19

Please sign in to comment.