Skip to content

Commit d0666b5

Browse files
committed
Improved example [skip ci]
1 parent 427a19d commit d0666b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/loading/src/main/java/com/example/Example.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ public static void main(String[] args) throws SQLException {
4141
// TODO use binary format
4242
CopyIn copyIn = copyManager.copyIn("COPY items (embedding) FROM STDIN");
4343
for (int i = 0; i < rows; i++) {
44-
if (i % 10000 == 0) {
45-
System.out.print(".");
46-
}
47-
4844
PGvector embedding = new PGvector(embeddings.get(i));
4945
byte[] bytes = (embedding.getValue() + "\n").getBytes();
5046
copyIn.writeToCopy(bytes, 0, bytes.length);
47+
48+
if (i % 10000 == 0) {
49+
System.out.print(".");
50+
}
5151
}
5252
copyIn.endCopy();
5353

0 commit comments

Comments
 (0)