-
Notifications
You must be signed in to change notification settings - Fork 29
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-179 Find by map/list containing: similar logic, multiple arguments #576
Conversation
…r multiple key&value pairs in findByMapContaining
…ListContaining, add support for String and null arguments for LIST_VAL_BETWEEN
params.add(0, value1); // value1 stores the first parameter | ||
if (op == MAP_VAL_CONTAINING_BY_KEY || op == MAP_VAL_EQ_BY_KEY) { | ||
if (params.size() > 2) { | ||
if ((params.size() & 1) != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
params.size() % 2 != 0
return aerospikeCriteriaAndConcatenated(params, qb, part, fieldName, op, dotPath, true); | ||
} else if (params.size() == 2) { | ||
setQbValuesForMapByKey(qb, params.get(0), params.get(1)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if params.size() < 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then the default flow continues with just the op set before and the logic in these conditions is not applied.
List<Object> params = new ArrayList<>(); | ||
parameters.forEachRemaining(params::add); | ||
|
||
if (params.size() >= 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use !isEmpty
if (IndexUtils.isFindByPojoSupported(client)) { | ||
List<String> listToCompareWith = List.of("str1", "str2"); | ||
assertThat(dave.getStrings()).isEqualTo(listToCompareWith); | ||
// if (IndexUtils.isFindByPojoSupported(client)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be removed?
…n/lessThan instead of null in findBetween
No description provided.