Last active
September 18, 2019 13:31
-
-
Save thomashartm/b4c5ddb64ed0faede44aa104f232bc1e to your computer and use it in GitHub Desktop.
A collection of AEM related JCR queries in the SQL2 query language. Some of these queries might be project specific but are a nice blueprint for similar requirements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find all custom image components by resource type below /content | |
SELECT * FROM [nt:unstructured] as r WHERE ISDESCENDANTNODE(r,'/content') AND [sling:resourceType] = 'project/components/par/image' | |
SELECT * FROM [nt:unstructured] as r WHERE ISDESCENDANTNODE(r,'/content') AND [sling:resourceType] = 'project/components/par/image' AND [fileReference] IS NOT NULL | |
# Find all users below a certain folder | |
SELECT * FROM [rep:User] as r WHERE ISDESCENDANTNODE(r,'/home/users/community/project') | |
SELECT * FROM [nt:unstructured] as r WHERE ISDESCENDANTNODE(r,'/home/users/community') AND [sling:resourceType] = 'cq/security/components/profile' AND [registrationDate] IS NOT NULL | |
SELECT * FROM [nt:unstructured] as r WHERE ISDESCENDANTNODE(r,'/home/users/community') AND oauthid LIKE "oauthSubjectId_%" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment