Skip to content

Commit 1799689

Browse files
committed
refactor: update
1 parent 520acd8 commit 1799689

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package ch.xxx.aidoclibchat.adapter.repository;
22

3-
import java.util.Optional;
4-
53
import org.springframework.data.jpa.repository.JpaRepository;
64

75
import ch.xxx.aidoclibchat.domain.model.entity.Document;
86

97
public interface JpaDocumentRepository extends JpaRepository<Document, Long> {
10-
Optional<Document> findById(Long id);
8+
119
}

backend/src/main/java/ch/xxx/aidoclibchat/domain/common/PGvector.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public PGvector(String s) throws SQLException {
5656
/**
5757
* Sets the value from a text representation of a vector
5858
*/
59+
@Override
5960
public void setValue(String s) throws SQLException {
6061
if (s == null) {
6162
vec = null;
@@ -71,6 +72,7 @@ public void setValue(String s) throws SQLException {
7172
/**
7273
* Returns the text representation of a vector
7374
*/
75+
@Override
7476
public String getValue() {
7577
if (vec == null) {
7678
return null;
@@ -82,13 +84,15 @@ public String getValue() {
8284
/**
8385
* Returns the number of bytes for the binary representation
8486
*/
87+
@Override
8588
public int lengthInBytes() {
8689
return vec == null ? 0 : 4 + vec.length * 4;
8790
}
8891

8992
/**
9093
* Sets the value from a binary representation of a vector
9194
*/
95+
@Override
9296
public void setByteValue(byte[] value, int offset) throws SQLException {
9397
int dim = ByteConverter.int2(value, offset);
9498

@@ -106,6 +110,7 @@ public void setByteValue(byte[] value, int offset) throws SQLException {
106110
/**
107111
* Writes the binary representation of a vector
108112
*/
113+
@Override
109114
public void toBytes(byte[] bytes, int offset) {
110115
if (vec == null) {
111116
return;

0 commit comments

Comments
 (0)