{ "db_name": "PostgreSQL", "query": "SELECT cb.id, cb.user_id,\n u.username, u.display_name,\n cb.ban_type AS \"ban_type: BanType\", cb.reason,\n cb.expires_at AS \"expires_at: chrono::DateTime\",\n cb.created_at AS \"created_at: chrono::DateTime\",\n actor.username AS banned_by_username\n FROM community_bans cb\n JOIN users u ON u.mnw_account_id = cb.user_id\n JOIN users actor ON actor.mnw_account_id = cb.banned_by\n WHERE cb.community_id = $1\n AND (cb.expires_at IS NULL OR cb.expires_at > now())\n ORDER BY cb.created_at DESC\n LIMIT $2", "describe": { "columns": [ { "ordinal": 0, "name": "id", "type_info": "Uuid" }, { "ordinal": 1, "name": "user_id", "type_info": "Uuid" }, { "ordinal": 2, "name": "username", "type_info": "Text" }, { "ordinal": 3, "name": "display_name", "type_info": "Text" }, { "ordinal": 4, "name": "ban_type: BanType", "type_info": "Text" }, { "ordinal": 5, "name": "reason", "type_info": "Text" }, { "ordinal": 6, "name": "expires_at: chrono::DateTime", "type_info": "Timestamptz" }, { "ordinal": 7, "name": "created_at: chrono::DateTime", "type_info": "Timestamptz" }, { "ordinal": 8, "name": "banned_by_username", "type_info": "Text" } ], "parameters": { "Left": [ "Uuid", "Int8" ] }, "nullable": [ false, false, false, true, false, true, true, false, false ] }, "hash": "0ba3bb2135932053e74fee53d32e33138819e31a184841df4b365f8e4c32b541" }