23 lines
707 B
JSON
23 lines
707 B
JSON
|
{
|
||
|
"db_name": "PostgreSQL",
|
||
|
"query": "WITH\n deleted_files AS (\n DELETE FROM files USING folders\n WHERE\n files.folder_id = folders.folder_id\n AND folders.owner_id = $1 RETURNING files.file_id\n ),\n deleted_users AS (\n DELETE FROM users\n WHERE\n user_id = $1\n )\nSELECT\n *\nFROM\n deleted_files;",
|
||
|
"describe": {
|
||
|
"columns": [
|
||
|
{
|
||
|
"ordinal": 0,
|
||
|
"name": "file_id",
|
||
|
"type_info": "Uuid"
|
||
|
}
|
||
|
],
|
||
|
"parameters": {
|
||
|
"Left": [
|
||
|
"Int4"
|
||
|
]
|
||
|
},
|
||
|
"nullable": [
|
||
|
false
|
||
|
]
|
||
|
},
|
||
|
"hash": "a54829e9cd90e55022c2f6dd413b797efaafd1c4793b60886140bfe9ea6df592"
|
||
|
}
|