Skip to content

Commit 68f377b

Browse files
committed
Improved example [skip ci]
1 parent ca26380 commit 68f377b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ public static void main(String[] args) throws SQLException {
5454
PGBinaryObject[] values = {new PGvector(embeddings.get(i))};
5555

5656
// write row
57-
ByteConverter.int2(buffer, 0, values.length);
58-
int pos = 2;
57+
int pos = 0;
58+
ByteConverter.int2(buffer, pos, values.length);
59+
pos += 2;
5960
for (int j = 0; j < values.length; j++) {
6061
PGBinaryObject value = values[j];
6162
int len = value.lengthInBytes();

0 commit comments

Comments
 (0)