From 474ab880292e1f97d7f9df5c84423f62168999df Mon Sep 17 00:00:00 2001 From: mikereiche Date: Mon, 15 Mar 2021 15:07:28 -0400 Subject: [PATCH] Upgrade Couchbase Java SDK to 3.1.3. Closes #1079. --- pom.xml | 4 ++-- .../repository/CouchbaseRepositoryQueryIntegrationTests.java | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a53a6a403..864533fff 100644 --- a/pom.xml +++ b/pom.xml @@ -18,8 +18,8 @@ - 3.1.0 - 3.1.0 + 3.1.3 + 3.1.3 2.5.0-SNAPSHOT spring.data.couchbase diff --git a/src/test/java/org/springframework/data/couchbase/repository/CouchbaseRepositoryQueryIntegrationTests.java b/src/test/java/org/springframework/data/couchbase/repository/CouchbaseRepositoryQueryIntegrationTests.java index a6378475f..db9f53fc9 100644 --- a/src/test/java/org/springframework/data/couchbase/repository/CouchbaseRepositoryQueryIntegrationTests.java +++ b/src/test/java/org/springframework/data/couchbase/repository/CouchbaseRepositoryQueryIntegrationTests.java @@ -34,6 +34,7 @@ import java.util.concurrent.Future; import java.util.stream.Collectors; +import com.couchbase.client.java.query.QueryScanConsistency; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -42,6 +43,7 @@ import org.springframework.data.couchbase.CouchbaseClientFactory; import org.springframework.data.couchbase.config.AbstractCouchbaseConfiguration; import org.springframework.data.couchbase.core.CouchbaseTemplate; +import org.springframework.data.couchbase.core.query.QueryCriteria; import org.springframework.data.couchbase.domain.Address; import org.springframework.data.couchbase.domain.Airport; import org.springframework.data.couchbase.domain.AirportRepository; @@ -317,12 +319,12 @@ void deleteAllById() { void couchbaseRepositoryQuery() throws Exception { User user = new User("1", "Dave", "Wilson"); userRepository.save(user); + couchbaseTemplate.findByQuery(User.class).withConsistency(QueryScanConsistency.REQUEST_PLUS).matching(QueryCriteria.where("firstname").is("Dave").and("`1`").is("`1`")).all(); String input = "findByFirstname"; Method method = UserRepository.class.getMethod(input, String.class); CouchbaseQueryMethod queryMethod = new CouchbaseQueryMethod(method, new DefaultRepositoryMetadata(UserRepository.class), new SpelAwareProxyProjectionFactory(), couchbaseTemplate.getConverter().getMappingContext()); - CouchbaseRepositoryQuery query = new CouchbaseRepositoryQuery(couchbaseTemplate, queryMethod, null); List users = (List)query.execute(new String[] { "Dave" }); assertEquals(user, users.get(0));