Skip to content

Commit

Permalink
Use proper range increment for values list (elixir-ecto#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-rychlewski authored and dkuku committed Nov 4, 2024
1 parent 5d53587 commit ed0c929
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/ecto/adapters/myxql/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ if Code.ensure_loaded?(MyXQL) do
end

defp values_list(types, num_rows, query) do
rows = Enum.to_list(1..num_rows)
rows = :lists.seq(1, num_rows, 1)

[
"VALUES ",
Expand Down
2 changes: 1 addition & 1 deletion lib/ecto/adapters/postgres/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ if Code.ensure_loaded?(Postgrex) do
end

defp values_list(types, idx, num_rows) do
rows = Enum.to_list(1..num_rows)
rows = :lists.seq(1, num_rows, 1)

[
"VALUES ",
Expand Down
2 changes: 1 addition & 1 deletion lib/ecto/adapters/tds/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ if Code.ensure_loaded?(Tds) do
end

defp values_list(types, idx, num_rows) do
rows = Enum.to_list(1..num_rows)
rows = :lists.seq(1, num_rows, 1)

[
"VALUES ",
Expand Down

0 comments on commit ed0c929

Please sign in to comment.