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.
27 lines
1.2 KiB
JSON
27 lines
1.2 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n SELECT COUNT(*) AS \"total!\" FROM (\n SELECT 1::int4 AS target_type, user_id, NULL::bigint AS room_id,\n revoked_at IS NULL AND (ends_at IS NULL OR ends_at > CURRENT_TIMESTAMP) AS is_active\n FROM user_bans\n UNION ALL\n SELECT 2::int4 AS target_type, NULL::bigint AS user_id, room_id,\n revoked_at IS NULL AND (ends_at IS NULL OR ends_at > CURRENT_TIMESTAMP) AS is_active\n FROM room_bans\n ) bans\n WHERE ($1::int4 IS NULL OR target_type = $1)\n AND ($2::bool IS NULL OR is_active = $2)\n AND ($3::bigint IS NULL OR user_id = $3)\n AND ($4::bigint IS NULL OR room_id = $4)\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "total!",
|
|
"type_info": "Int8",
|
|
"origin": "Expression"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int4",
|
|
"Bool",
|
|
"Int8",
|
|
"Int8"
|
|
]
|
|
},
|
|
"nullable": [
|
|
null
|
|
]
|
|
},
|
|
"hash": "016d7abf86a52d4a30c21588641548cfb2074948c477c3a581034310173b7858"
|
|
}
|