mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.3 KiB
JSON
36 lines
1.3 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n SELECT m.playlist_id AS \"playlist_id!: PlaylistId\", COUNT(*) AS \"cnt!\"\n FROM media m\n LEFT JOIN users u\n ON m.creator_id = u.id\n AND u.deleted_at IS NULL\n WHERE m.playlist_id = ANY($1)\n AND (m.creator_id IS NULL OR (\n u.id IS NOT NULL AND NOT EXISTS (\n SELECT 1 FROM user_bans ub\n WHERE ub.user_id = u.id\n AND ub.revoked_at IS NULL\n AND (ub.ends_at IS NULL OR ub.ends_at > CURRENT_TIMESTAMP)\n )\n ))\n GROUP BY m.playlist_id\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "playlist_id!: PlaylistId",
|
|
"type_info": "Int8",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "media",
|
|
"name": "playlist_id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "cnt!",
|
|
"type_info": "Int8",
|
|
"origin": "Expression"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8Array"
|
|
]
|
|
},
|
|
"nullable": [
|
|
true,
|
|
null
|
|
]
|
|
},
|
|
"hash": "4828283bb0f312bd157cc38ee9ba499725dcecf132c2e2d4c4b6fb1ed4ded48e"
|
|
}
|