add tests for UPDATE queries in reactive and regular repos

This commit is contained in:
Gavin King 2024-12-20 21:18:06 +01:00
parent 3b3bd5ec1a
commit 2efcb1de6b
2 changed files with 18 additions and 0 deletions

View File

@ -213,4 +213,13 @@ public interface BookAuthorRepository {
@Query("")
List<Author> withNoOrder2(PageRequest pageRequest);
@Query("update Author set name = :name where ssn = :id")
void updateAuthorAddress1(String id, String name);
@Query("update Author set name = :name where ssn = :id")
int updateAuthorAddress2(String id, String name);
@Query("update Author set name = :name where ssn = :id")
boolean updateAuthorAddress3(String id, String name);
}

View File

@ -107,4 +107,13 @@ public interface Library {
@Find
Uni<List<Author>> authorsByCityAndPostcode(String address_city, String address_postcode);
@Query("update Author set address = :address where ssn = :id")
Uni<Void> updateAuthorAddress1(String id, Address address);
@Query("update Author set address = :address where ssn = :id")
Uni<Integer> updateAuthorAddress2(String id, Address address);
@Query("update Author set address = :address where ssn = :id")
Uni<Boolean> updateAuthorAddress3(String id, Address address);
}