Skip to main content

max / makenotwork

1.9 KB · 72 lines History Blame Raw
1 {
2 "db_name": "PostgreSQL",
3 "query": "SELECT f.id AS flag_id, f.post_id, p.thread_id,\n t.title AS thread_title,\n cat.slug AS category_slug,\n u.username AS flagger_username,\n f.reason, f.detail,\n f.created_at AS \"created_at: chrono::DateTime<chrono::Utc>\"\n FROM post_flags f\n JOIN posts p ON p.id = f.post_id\n JOIN threads t ON t.id = p.thread_id\n JOIN categories cat ON cat.id = t.category_id\n JOIN users u ON u.mnw_account_id = f.flagger_id\n WHERE cat.community_id = $1 AND f.resolved_at IS NULL\n ORDER BY f.created_at DESC\n LIMIT $2",
4 "describe": {
5 "columns": [
6 {
7 "ordinal": 0,
8 "name": "flag_id",
9 "type_info": "Uuid"
10 },
11 {
12 "ordinal": 1,
13 "name": "post_id",
14 "type_info": "Uuid"
15 },
16 {
17 "ordinal": 2,
18 "name": "thread_id",
19 "type_info": "Uuid"
20 },
21 {
22 "ordinal": 3,
23 "name": "thread_title",
24 "type_info": "Text"
25 },
26 {
27 "ordinal": 4,
28 "name": "category_slug",
29 "type_info": "Text"
30 },
31 {
32 "ordinal": 5,
33 "name": "flagger_username",
34 "type_info": "Text"
35 },
36 {
37 "ordinal": 6,
38 "name": "reason",
39 "type_info": "Text"
40 },
41 {
42 "ordinal": 7,
43 "name": "detail",
44 "type_info": "Text"
45 },
46 {
47 "ordinal": 8,
48 "name": "created_at: chrono::DateTime<chrono::Utc>",
49 "type_info": "Timestamptz"
50 }
51 ],
52 "parameters": {
53 "Left": [
54 "Uuid",
55 "Int8"
56 ]
57 },
58 "nullable": [
59 false,
60 false,
61 false,
62 false,
63 false,
64 false,
65 false,
66 true,
67 false
68 ]
69 },
70 "hash": "3e96c0ec2759d2f309a2139218e7ce0c5c0addddf0dc62ffc78e7761286d4e54"
71 }
72