You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2022/09/16 09:17:18 UTC
[GitHub] [sling-org-apache-sling-resourceresolver] joerghoh commented on a diff in pull request #82: SLING-11581: use keyset pagination for vanity path query
joerghoh commented on code in PR #82:
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/82#discussion_r972821107
##########
src/test/java/org/apache/sling/resourceresolver/impl/mapping/InMemoryResourceProvider.java:
##########
@@ -103,7 +103,7 @@ public Iterator<Resource> findResources(@NotNull ResolveContext<Void> ctx, Strin
.iterator();
}
- if ( "JCR-SQL2".equals(language) && "SELECT [sling:vanityPath], [sling:redirect], [sling:redirectStatus] FROM [nt:base] WHERE NOT isdescendantnode('/jcr:system') AND [sling:vanityPath] IS NOT NULL ORDER BY FIRST([sling:vanityPath]), [jcr:path]".equals(query) ) {
+ if ( "JCR-SQL2".equals(language) && "SELECT [sling:vanityPath], [sling:redirect], [sling:redirectStatus] FROM [nt:base] WHERE NOT isdescendantnode('/jcr:system') AND [sling:vanityPath] IS NOT NULL AND FIRST([sling:vanityPath]) > '' ORDER BY FIRST([sling:vanityPath])".equals(query) ) {
Review Comment:
Would it make sense to move this query into a constant (or build a function returning it if it needs parameters), which is used in both production code and the tests?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org