How do you usually aggregate in list in sqldelight...
# squarelibraries
d
How do you usually aggregate in list in sqldelight? For example I have table of
Files
and table of
Folders
and I want to select all files and for each a list of folders to which it belongs. Something like this "pseudo" query:
Copy code
SELECT file.id, file.name, COLLECT_IN_LIST(folder.name) as List<String>
FROM file
JOIN folder on folder.fileId == file.id
GROUP BY folder.name;
And have
data class Result(id: String, name: String, folders: List<String>
. But no COLLECT_IN_LIST aggregate function exists...