Skip to main content

max / makenotwork

1.6 KB · 55 lines History Blame Raw
1 {
2 "db_name": "PostgreSQL",
3 "query": "SELECT t.id AS thread_id,\n t.title AS thread_title,\n c.name AS category_name,\n c.slug AS category_slug,\n p.created_at AS \"post_created_at: chrono::DateTime<chrono::Utc>\",\n (t.author_id = $2) AS \"is_thread_author!\"\n FROM posts p\n JOIN threads t ON t.id = p.thread_id\n JOIN categories c ON c.id = t.category_id\n WHERE c.community_id = $1\n AND p.author_id = $2\n AND p.removed_at IS NULL\n AND p.deleted_at IS NULL\n AND t.deleted_at IS NULL\n ORDER BY p.created_at DESC\n LIMIT $3",
4 "describe": {
5 "columns": [
6 {
7 "ordinal": 0,
8 "name": "thread_id",
9 "type_info": "Uuid"
10 },
11 {
12 "ordinal": 1,
13 "name": "thread_title",
14 "type_info": "Text"
15 },
16 {
17 "ordinal": 2,
18 "name": "category_name",
19 "type_info": "Text"
20 },
21 {
22 "ordinal": 3,
23 "name": "category_slug",
24 "type_info": "Text"
25 },
26 {
27 "ordinal": 4,
28 "name": "post_created_at: chrono::DateTime<chrono::Utc>",
29 "type_info": "Timestamptz"
30 },
31 {
32 "ordinal": 5,
33 "name": "is_thread_author!",
34 "type_info": "Bool"
35 }
36 ],
37 "parameters": {
38 "Left": [
39 "Uuid",
40 "Uuid",
41 "Int8"
42 ]
43 },
44 "nullable": [
45 false,
46 false,
47 false,
48 false,
49 false,
50 null
51 ]
52 },
53 "hash": "150877ff6d3dd6d1c8034f0f5f9af152b5759f9c0b7e0c3549b636be95f65f89"
54 }
55