16 lines
752 B
JSON
16 lines
752 B
JSON
|
{
|
||
|
"db_name": "PostgreSQL",
|
||
|
"query": "WITH RECURSIVE folder_hierarchy AS (\n -- Start with the given directory\n SELECT \n folder_id \n FROM \n folders \n WHERE \n folder_id = $1\n\n UNION ALL\n\n -- Recursively find all subdirectories\n SELECT \n f.folder_id\n FROM \n folders f\n INNER JOIN \n folder_hierarchy fh ON f.parent_folder_id = fh.folder_id\n)\nDELETE FROM permissions WHERE user_id = $2 AND folder_id IN (SELECT folder_id FROM folder_hierarchy)",
|
||
|
"describe": {
|
||
|
"columns": [],
|
||
|
"parameters": {
|
||
|
"Left": [
|
||
|
"Uuid",
|
||
|
"Int4"
|
||
|
]
|
||
|
},
|
||
|
"nullable": []
|
||
|
},
|
||
|
"hash": "948f13b631bcc7df1919a9639443f0ed932c4cb37f2ba5bf6f000eb84b265ae2"
|
||
|
}
|