Need DQL to find the folder size recursively starting from a specific folder id.
Assume folder structure like below. 0b00138e806ab014 is r_object_id of the folder and number 100 refers to the document size (r_full_content_size) , not necessarily always 100 but just a sample number for simplicity.
folder a
folder b - 0b00138e806bb023
doc1 - 100
doc2 - 100
folder x
doc3 - 100
doc4 - 100
folder y
doc5 - 100
doc6 - 100
folder z
doc 7 - 100
doc 8 - 100
folder c
I need a DQL that uses input folder id 0b00138e806bb023 and can output like below
/repo/folder b 800
/repo/folder b/folder x 200
/repo/folder b/folder y 400
/repo/folder b/folder y/folder z 200
In the above result 800 is the sum of all docs size in folder b including all its subfolders ; 200 is the sum of all docs size in the specific folder and all its subfolders , etc.
Any ideas.