Skip to content

Commit

Permalink
refactor: update TODO for issue redis#88 - redis#88
Browse files Browse the repository at this point in the history
  • Loading branch information
bsbodden committed Aug 14, 2022
1 parent 8155619 commit 8597d78
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private Object executeQuery(Object[] parameters) {
Pageable pageable = maybePageable.get();
if (!pageable.isUnpaged()) {
query.limit(Long.valueOf(pageable.getOffset()).intValue(), pageable.getPageSize());

if (pageable.getSort() != null) {
for (Order order : pageable.getSort()) {
query.setSortBy(order.getProperty(), order.isAscending());
Expand Down Expand Up @@ -353,7 +353,7 @@ private Object executeAggregation(Object[] parameters) {
if (queryMethod.getReturnedObjectType() == AggregationResult.class) {
result = aggregationResult;
} else if (queryMethod.isCollectionQuery()) {
result = Collections.EMPTY_LIST; // TODO: WTF Sam-Bodden?
result = Collections.EMPTY_LIST; // TODO: Handle custom return values, see https://github.com/redis/redis-om-spring/issues/88
}

return result;
Expand Down Expand Up @@ -405,15 +405,15 @@ private String prepareQuery(final Object[] parameters) {
: (paramNames.size() > index ? paramNames.get(index) : ""));
if (!key.isBlank()) {
String v = "";

if (parameters[index] instanceof Collection<?>) {
@SuppressWarnings("rawtypes")
Collection<?> c = (Collection) parameters[index];
v = c.stream().map(n -> n.toString()).collect(Collectors.joining(" | "));
} else {
v = parameters[index].toString();
}


preparedQuery = new StringBuilder(preparedQuery.toString().replace("$" + key, v));
}
Expand Down

0 comments on commit 8597d78

Please sign in to comment.