|
15 | 15 | */ |
16 | 16 | package org.springframework.data.neo4j.core.mapping; |
17 | 17 |
|
| 18 | +import static org.neo4j.cypherdsl.core.Cypher.anyNode; |
| 19 | +import static org.neo4j.cypherdsl.core.Cypher.listBasedOn; |
| 20 | +import static org.neo4j.cypherdsl.core.Cypher.literalOf; |
| 21 | +import static org.neo4j.cypherdsl.core.Cypher.match; |
| 22 | +import static org.neo4j.cypherdsl.core.Cypher.node; |
| 23 | +import static org.neo4j.cypherdsl.core.Cypher.optionalMatch; |
| 24 | +import static org.neo4j.cypherdsl.core.Cypher.parameter; |
| 25 | +import static org.neo4j.cypherdsl.core.Functions.coalesce; |
| 26 | + |
| 27 | +import java.util.ArrayList; |
| 28 | +import java.util.Arrays; |
| 29 | +import java.util.Collection; |
| 30 | +import java.util.List; |
| 31 | +import java.util.function.Predicate; |
| 32 | +import java.util.function.UnaryOperator; |
| 33 | + |
18 | 34 | import org.apiguardian.api.API; |
19 | 35 | import org.neo4j.cypherdsl.core.Condition; |
20 | 36 | import org.neo4j.cypherdsl.core.Conditions; |
|
41 | 57 | import org.springframework.lang.Nullable; |
42 | 58 | import org.springframework.util.Assert; |
43 | 59 |
|
44 | | -import java.util.ArrayList; |
45 | | -import java.util.Arrays; |
46 | | -import java.util.Collection; |
47 | | -import java.util.List; |
48 | | -import java.util.function.Predicate; |
49 | | -import java.util.function.UnaryOperator; |
50 | | - |
51 | | -import static org.neo4j.cypherdsl.core.Cypher.anyNode; |
52 | | -import static org.neo4j.cypherdsl.core.Cypher.listBasedOn; |
53 | | -import static org.neo4j.cypherdsl.core.Cypher.literalOf; |
54 | | -import static org.neo4j.cypherdsl.core.Cypher.match; |
55 | | -import static org.neo4j.cypherdsl.core.Cypher.node; |
56 | | -import static org.neo4j.cypherdsl.core.Cypher.optionalMatch; |
57 | | -import static org.neo4j.cypherdsl.core.Cypher.parameter; |
58 | | -import static org.neo4j.cypherdsl.core.Functions.coalesce; |
59 | | - |
60 | 60 | /** |
61 | 61 | * A generator based on the schema defined by node and relationship descriptions. Most methods return renderable Cypher |
62 | 62 | * statements. |
@@ -482,6 +482,9 @@ public Expression[] createReturnStatementForMatch(NodeDescription<?> nodeDescrip |
482 | 482 | } else { |
483 | 483 | expression = Cypher.name(property); |
484 | 484 | } |
| 485 | + if (order.isIgnoreCase()) { |
| 486 | + expression = Functions.toLower(expression); |
| 487 | + } |
485 | 488 | return order.isAscending() ? expression.ascending() : expression.descending(); |
486 | 489 | }).toArray(SortItem[]::new)) |
487 | 490 | .build(); |
|
0 commit comments