This repository has been archived on 2024-08-23. You can view files and clone it, but cannot push or open issues or pull requests.
project/sql/get_folders.sql

11 lines
221 B
MySQL
Raw Normal View History

2024-08-01 17:30:10 +00:00
SELECT
f.folder_id,
owner_id,
folder_name,
created_at
FROM
folders f
2024-08-04 06:48:41 +00:00
LEFT JOIN permissions p ON f.folder_id = p.folder_id
2024-08-01 17:30:10 +00:00
WHERE
parent_folder_id = $1
2024-08-04 06:48:41 +00:00
AND (p.user_id = $2 OR f.owner_id = $2)