this repo has no description
1{
2 "db_name": "PostgreSQL",
3 "query": "\n UPDATE notification_queue\n SET status = 'processing', updated_at = NOW()\n WHERE id IN (\n SELECT id FROM notification_queue\n WHERE status = 'pending'\n AND scheduled_for <= $1\n AND attempts < max_attempts\n ORDER BY scheduled_for ASC\n LIMIT $2\n FOR UPDATE SKIP LOCKED\n )\n RETURNING\n id, user_id,\n channel as \"channel: NotificationChannel\",\n notification_type as \"notification_type: super::types::NotificationType\",\n status as \"status: NotificationStatus\",\n recipient, subject, body, metadata,\n attempts, max_attempts, last_error,\n created_at, updated_at, scheduled_for, processed_at\n ",
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": "channel: NotificationChannel",
19 "type_info": {
20 "Custom": {
21 "name": "notification_channel",
22 "kind": {
23 "Enum": [
24 "email",
25 "discord",
26 "telegram",
27 "signal"
28 ]
29 }
30 }
31 }
32 },
33 {
34 "ordinal": 3,
35 "name": "notification_type: super::types::NotificationType",
36 "type_info": {
37 "Custom": {
38 "name": "notification_type",
39 "kind": {
40 "Enum": [
41 "welcome",
42 "email_verification",
43 "password_reset",
44 "email_update",
45 "account_deletion",
46 "admin_email",
47 "plc_operation",
48 "two_factor_code"
49 ]
50 }
51 }
52 }
53 },
54 {
55 "ordinal": 4,
56 "name": "status: NotificationStatus",
57 "type_info": {
58 "Custom": {
59 "name": "notification_status",
60 "kind": {
61 "Enum": [
62 "pending",
63 "processing",
64 "sent",
65 "failed"
66 ]
67 }
68 }
69 }
70 },
71 {
72 "ordinal": 5,
73 "name": "recipient",
74 "type_info": "Text"
75 },
76 {
77 "ordinal": 6,
78 "name": "subject",
79 "type_info": "Text"
80 },
81 {
82 "ordinal": 7,
83 "name": "body",
84 "type_info": "Text"
85 },
86 {
87 "ordinal": 8,
88 "name": "metadata",
89 "type_info": "Jsonb"
90 },
91 {
92 "ordinal": 9,
93 "name": "attempts",
94 "type_info": "Int4"
95 },
96 {
97 "ordinal": 10,
98 "name": "max_attempts",
99 "type_info": "Int4"
100 },
101 {
102 "ordinal": 11,
103 "name": "last_error",
104 "type_info": "Text"
105 },
106 {
107 "ordinal": 12,
108 "name": "created_at",
109 "type_info": "Timestamptz"
110 },
111 {
112 "ordinal": 13,
113 "name": "updated_at",
114 "type_info": "Timestamptz"
115 },
116 {
117 "ordinal": 14,
118 "name": "scheduled_for",
119 "type_info": "Timestamptz"
120 },
121 {
122 "ordinal": 15,
123 "name": "processed_at",
124 "type_info": "Timestamptz"
125 }
126 ],
127 "parameters": {
128 "Left": [
129 "Timestamptz",
130 "Int8"
131 ]
132 },
133 "nullable": [
134 false,
135 false,
136 false,
137 false,
138 false,
139 false,
140 true,
141 false,
142 true,
143 false,
144 false,
145 true,
146 false,
147 false,
148 false,
149 true
150 ]
151 },
152 "hash": "cb6f48aaba124c79308d20e66c23adb44d1196296b7f93fad19b2d17548ed3de"
153}