Skip to content

Commit

Permalink
Use proper range increment for values list (#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-rychlewski authored Oct 11, 2024
1 parent 41870f1 commit 1f631fc
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 @@ -1137,7 +1137,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 1f631fc

Please sign in to comment.