Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FMWK-55 Supporting Map and List filtering (integer only), refactoring Qualifier, AerospikeCriteria, AerospikeQueryCreator #434

Merged

Conversation

agrgr
Copy link

@agrgr agrgr commented Oct 12, 2022

  • refactoring Qualifier switch-case
  • Qualifier telescoping constructors into a Builder
  • AerospikeCriteria constructors into a Builder
  • Qualifier FilterOperation enum out as a separate class
  • removing Criteria class
  • adding support for querying by map elements similar to findByPojoField
  • increasing readability, reducing excessive code etc.
  • test coverage

@agrgr agrgr requested review from reugn and roimenashe October 12, 2022 11:26
@reugn reugn changed the title Fmwk 55 refactoring aerospike criteria and qualifier constructors FMWK-55 Refactor Aerospike Criteria and Qualifier constructors Oct 12, 2022
agrgr and others added 10 commits October 12, 2022 19:06
…st (filtering by string elements is not supported so far due to clientside)
…alifier-constructors

# Conflicts:
#	src/main/java/org/springframework/data/aerospike/query/Qualifier.java
#	src/test/java/org/springframework/data/aerospike/repository/PersonRepositoryQueryTests.java
#	src/test/java/org/springframework/data/aerospike/sample/Person.java
…alifier-constructors

# Conflicts:
#	src/main/java/org/springframework/data/aerospike/query/Qualifier.java
#	src/main/java/org/springframework/data/aerospike/repository/query/AerospikeQueryCreator.java
#	src/test/java/org/springframework/data/aerospike/repository/PersonRepositoryQueryTests.java
#	src/test/java/org/springframework/data/aerospike/sample/Person.java
…teria-and-Qualifier-constructors' into FMWK-55-refactoring-AerospikeCriteria-and-Qualifier-constructors
@agrgr agrgr changed the title FMWK-55 Refactor Aerospike Criteria and Qualifier constructors FMWK-55 Supporting Map and List filtering (integer only), refactoring Qualifier, AerospikeCriteria, AerospikeQueryCreator Oct 13, 2022
agrgr and others added 2 commits October 13, 2022 15:14
…alifier-constructors

# Conflicts:
#	src/test/java/org/springframework/data/aerospike/repository/PersonRepositoryQueryTests.java
reugn and others added 6 commits October 16, 2022 09:53
…teria-and-Qualifier-constructors' into FMWK-55-refactoring-AerospikeCriteria-and-Qualifier-constructors
…teria-and-Qualifier-constructors' into FMWK-55-refactoring-AerospikeCriteria-and-Qualifier-constructors
@@ -67,7 +67,11 @@ public Qualifier getCriteriaObject() {
for (Criteria c : this.criteriaChain) {
qualifiers.add(c.getCriteriaObject());
}
return new Qualifier(op, qualifiers.toArray(new Qualifier[0]));
// return new Qualifier(op, qualifiers.toArray(new Qualifier[0]));
Copy link
Member

@roimenashe roimenashe Oct 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove line?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Criteria class is going to be removed (as discussed)

Copy link

@ijusti ijusti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there estimates or milestones for release?

agrgr added 3 commits October 18, 2022 17:08
…teria-and-Qualifier-constructors' into FMWK-55-refactoring-AerospikeCriteria-and-Qualifier-constructors

# Conflicts:
#	src/main/java/org/springframework/data/aerospike/query/FilterOperation.java
#	src/test/java/org/springframework/data/aerospike/sample/PersonRepository.java
@agrgr
Copy link
Author

agrgr commented Oct 18, 2022

Is there estimates or milestones for release?

@ijusti, there is secondary index related work left, as far as I know

}

@Override
public Filter secIndexFilter(Map<String, Object> map) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change secIndexFilter to sIndexFilter (it's more common in most of Aerospike documentation regarding secondary indexes).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

protected Filter geoWithinRadius(IndexCollectionType collectionType, Map<String, Object> map) {
return Filter.geoContains(getField(map), getValue1(map).toString());
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove 3 unnecessary spaces.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@roimenashe roimenashe merged commit bb020b6 into main Oct 20, 2022
@reugn reugn deleted the FMWK-55-refactoring-AerospikeCriteria-and-Qualifier-constructors branch February 14, 2023 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants