Skip to content

Commit

Permalink
Fix integration benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
jackc committed Dec 21, 2024
1 parent dacffdc commit 9d851d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pgtype/integration_benchmark_test.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func BenchmarkQuery<%= format_name %>FormatDecode_PG_<%= pg_type %>_to_Go_<%= go
rows, _ := conn.Query(
ctx,
`select <% columns.times do |col_idx| %><% if col_idx != 0 %>, <% end %>n::<%= pg_type %> + <%= col_idx%><% end %> from generate_series(1, <%= rows %>) n`,
[]any{pgx.QueryResultFormats{<%= format_code %>}},
pgx.QueryResultFormats{<%= format_code %>},
)
_, err := pgx.ForEachRow(rows, []any{<% columns.times do |col_idx| %><% if col_idx != 0 %>, <% end %>&v[<%= col_idx%>]<% end %>}, func() error { return nil })
if err != nil {
Expand All @@ -49,7 +49,7 @@ func BenchmarkQuery<%= format_name %>FormatDecode_PG_Int4Array_With_Go_Int4Array
rows, _ := conn.Query(
ctx,
`select array_agg(n) from generate_series(1, <%= array_size %>) n`,
[]any{pgx.QueryResultFormats{<%= format_code %>}},
pgx.QueryResultFormats{<%= format_code %>},
)
_, err := pgx.ForEachRow(rows, []any{&v}, func() error { return nil })
if err != nil {
Expand Down

0 comments on commit 9d851d7

Please # to comment.