Skip to main content

max / makenotwork

1.2 KB · 41 lines History Blame Raw
1 {
2 "db_name": "PostgreSQL",
3 "query": "\n UPDATE user_sessions us\n SET last_active_at = NOW()\n FROM users u\n WHERE us.id = $1 AND u.id = us.user_id\n RETURNING\n u.suspended_at IS NOT NULL AS \"suspended!\",\n u.can_create_projects AS \"can_create_projects!\",\n EXISTS(SELECT 1 FROM fan_plus_subscriptions fps WHERE fps.user_id = u.id AND fps.status = 'active') AS \"is_fan_plus!\",\n (SELECT cs.tier FROM creator_subscriptions cs WHERE cs.user_id = u.id AND cs.status = 'active') AS \"creator_tier\"\n ",
4 "describe": {
5 "columns": [
6 {
7 "ordinal": 0,
8 "name": "suspended!",
9 "type_info": "Bool"
10 },
11 {
12 "ordinal": 1,
13 "name": "can_create_projects!",
14 "type_info": "Bool"
15 },
16 {
17 "ordinal": 2,
18 "name": "is_fan_plus!",
19 "type_info": "Bool"
20 },
21 {
22 "ordinal": 3,
23 "name": "creator_tier",
24 "type_info": "Text"
25 }
26 ],
27 "parameters": {
28 "Left": [
29 "Uuid"
30 ]
31 },
32 "nullable": [
33 null,
34 false,
35 null,
36 null
37 ]
38 },
39 "hash": "1428b78893adfe9e3120fef1a0abc45a83ba4e303e199c9e9234b275ffe2b2c8"
40 }
41