SELECT
users.user_id,
permission_type as "permission_type: PermissionRaw"
FROM
permissions
INNER JOIN users ON permissions.user_id = users.user_id
WHERE
folder_id = $1