|
34 | 34 | import java.util.concurrent.Future;
|
35 | 35 | import java.util.stream.Collectors;
|
36 | 36 |
|
| 37 | +import com.couchbase.client.java.query.QueryScanConsistency; |
37 | 38 | import org.junit.jupiter.api.BeforeEach;
|
38 | 39 | import org.junit.jupiter.api.Test;
|
39 | 40 |
|
|
43 | 44 | import org.springframework.data.couchbase.CouchbaseClientFactory;
|
44 | 45 | import org.springframework.data.couchbase.config.AbstractCouchbaseConfiguration;
|
45 | 46 | import org.springframework.data.couchbase.core.CouchbaseTemplate;
|
| 47 | +import org.springframework.data.couchbase.core.query.QueryCriteria; |
46 | 48 | import org.springframework.data.couchbase.domain.Address;
|
47 | 49 | import org.springframework.data.couchbase.domain.Airport;
|
48 | 50 | import org.springframework.data.couchbase.domain.AirportRepository;
|
@@ -295,28 +297,12 @@ void threadSafeStringParametersTest() throws Exception {
|
295 | 297 | }
|
296 | 298 | }
|
297 | 299 |
|
298 |
| - @Test // DATACOUCH-650 |
299 |
| - void deleteAllById() { |
300 |
| - |
301 |
| - Airport vienna = new Airport("airports::vie", "vie", "LOWW"); |
302 |
| - Airport frankfurt = new Airport("airports::fra", "fra", "EDDF"); |
303 |
| - Airport losAngeles = new Airport("airports::lax", "lax", "KLAX"); |
304 |
| - |
305 |
| - try { |
306 |
| - airportRepository.saveAll(asList(vienna, frankfurt, losAngeles)); |
307 |
| - |
308 |
| - airportRepository.deleteAllById(asList(vienna.getId(), losAngeles.getId())); |
309 |
| - |
310 |
| - assertThat(airportRepository.findAll()).containsExactly(frankfurt); |
311 |
| - } finally { |
312 |
| - airportRepository.deleteAll(); |
313 |
| - } |
314 |
| - } |
315 |
| - |
316 | 300 | @Test
|
317 | 301 | void couchbaseRepositoryQuery() throws Exception {
|
318 | 302 | User user = new User("1", "Dave", "Wilson");
|
319 | 303 | userRepository.save(user);
|
| 304 | + couchbaseTemplate.findByQuery(User.class).withConsistency(QueryScanConsistency.REQUEST_PLUS).matching( |
| 305 | + QueryCriteria.where("firstname").is("Dave").and("`1`").is("`1`")).all(); |
320 | 306 | String input = "findByFirstname";
|
321 | 307 | Method method = UserRepository.class.getMethod(input, String.class);
|
322 | 308 | CouchbaseQueryMethod queryMethod = new CouchbaseQueryMethod(method,
|
|
0 commit comments