Skip to main content

max / makenotwork

2.0 KB · 72 lines History Blame Raw
1 {
2 "db_name": "PostgreSQL",
3 "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<chrono::Utc>\",\n cb.created_at AS \"created_at: chrono::DateTime<chrono::Utc>\",\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",
4 "describe": {
5 "columns": [
6 {
7 "ordinal": 0,
8 "name": "id",
9 "type_info": "Uuid"
10 },
11 {
12 "ordinal": 1,
13 "name": "user_id",
14 "type_info": "Uuid"
15 },
16 {
17 "ordinal": 2,
18 "name": "username",
19 "type_info": "Text"
20 },
21 {
22 "ordinal": 3,
23 "name": "display_name",
24 "type_info": "Text"
25 },
26 {
27 "ordinal": 4,
28 "name": "ban_type: BanType",
29 "type_info": "Text"
30 },
31 {
32 "ordinal": 5,
33 "name": "reason",
34 "type_info": "Text"
35 },
36 {
37 "ordinal": 6,
38 "name": "expires_at: chrono::DateTime<chrono::Utc>",
39 "type_info": "Timestamptz"
40 },
41 {
42 "ordinal": 7,
43 "name": "created_at: chrono::DateTime<chrono::Utc>",
44 "type_info": "Timestamptz"
45 },
46 {
47 "ordinal": 8,
48 "name": "banned_by_username",
49 "type_info": "Text"
50 }
51 ],
52 "parameters": {
53 "Left": [
54 "Uuid",
55 "Int8"
56 ]
57 },
58 "nullable": [
59 false,
60 false,
61 false,
62 true,
63 false,
64 true,
65 true,
66 false,
67 false
68 ]
69 },
70 "hash": "0ba3bb2135932053e74fee53d32e33138819e31a184841df4b365f8e4c32b541"
71 }
72