Skip to content

Commit c2917fa

Browse files
committed
Improved example [skip ci]
1 parent 783a219 commit c2917fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/loading/example.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
coder = PG::BinaryEncoder::CopyRow.new
2121
conn.copy_data("COPY items (embedding) FROM STDIN WITH (FORMAT BINARY)", coder) do
2222
embeddings.each_over_axis(0).with_index do |embedding, i|
23+
conn.put_copy_data([Pgvector::Vector.new(embedding).to_binary])
24+
2325
# show progress
2426
putc "." if i % 10000 == 0
25-
26-
conn.put_copy_data([Pgvector::Vector.new(embedding).to_binary])
2727
end
2828
end
2929

0 commit comments

Comments
 (0)