Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr committed Oct 22, 2023
1 parent 8b518e7 commit 128e1d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Object execute(Object[] parameters) {
AerospikeCriteria criteria = query.getAerospikeCriteria();
Qualifier[] qualifiers = getQualifiers(criteria);
Qualifier idQualifier;
if (isSingleIdQuery(criteria)) { //
if (isSingleIdQuery(criteria)) {
return runIdQuery(entityClass, targetClass, getIdValue(qualifiers[0]));
} else {
if ((idQualifier = getIdQualifier(criteria)) != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ public void findPersonsByQualifiers() {
.setFilterOperation(FilterOperation.LT)
.setValue1AsObj(50000L)
.build();
// assertThat(repository.findByQualifier(sinceUpdateTimeLt50Seconds)).containsAll(allPersons);
assertThat(repository.findByQualifier(sinceUpdateTimeLt50Seconds)).containsAll(allPersons);

// creating a condition "since_update_time metadata value is between 1 millisecond and 50 seconds"
Qualifier sinceUpdateTimeBetween1And50000 = Qualifier.metadataBuilder()
Expand All @@ -1278,27 +1278,27 @@ public void findPersonsByQualifiers() {
.setFilterOperation(FilterOperation.EQ)
.setValue1(Value.get(49))
.build();
// result = repository.findByQualifier(ageEq49);
// assertThat(result).containsOnly(carter);
result = repository.findByQualifier(ageEq49);
assertThat(result).containsOnly(carter);

// creating a condition "age is greater than 49"
Qualifier ageGt49 = Qualifier.builder()
.setFilterOperation(FilterOperation.GT)
.setField("age")
.setValue1(Value.get(49))
.build();
// result = repository.findByQualifier(ageGt49);
// assertThat(result).doesNotContain(carter);
result = repository.findByQualifier(ageGt49);
assertThat(result).doesNotContain(carter);

// creating a condition "id equals Carter's id"
Qualifier keyEqCartersId = Qualifier.forId(carter.getId());
// result = repository.findByQualifier(keyEqCartersId);
// assertThat(result).containsOnly(carter);
result = repository.findByQualifier(keyEqCartersId);
assertThat(result).containsOnly(carter);

// creating a condition "id equals Boyd's id"
Qualifier keyEqBoydsId = Qualifier.forId(boyd.getId());
// result = repository.findByQualifier(keyEqBoydsId);
// assertThat(result).containsOnly(boyd);
result = repository.findByQualifier(keyEqBoydsId);
assertThat(result).containsOnly(boyd);

// analogous to {@link SimpleAerospikeRepository#findAllById(Iterable)}
// creating a condition "id equals Carter's id OR Boyd's id"
Expand Down

0 comments on commit 128e1d2

Please sign in to comment.