Skip to content

Commit 5354be1

Browse files
committed
Added byte[] constructor to PGbit [skip ci]
1 parent b343f4a commit 5354be1

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.6 (unreleased)
2+
3+
- Added `byte[]` constructor to `PGbit`
4+
15
## 0.1.5 (2024-06-25)
26

37
- Added support for `halfvec`, `bit`, and `sparsevec` types

src/main/java/com/pgvector/PGbit.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ public PGbit(boolean[] v) {
3939
}
4040
}
4141

42+
/**
43+
* Constructor
44+
*
45+
* @param v byte array
46+
*/
47+
public PGbit(byte[] v) {
48+
this();
49+
length = v.length * 8;
50+
data = v;
51+
}
52+
4253
/**
4354
* Constructor
4455
*

0 commit comments

Comments
 (0)