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 "channel_verification"
50 ]
51 }
52 }
53 }
54 },
55 {
56 "ordinal": 4,
57 "name": "status: NotificationStatus",
58 "type_info": {
59 "Custom": {
60 "name": "notification_status",
61 "kind": {
62 "Enum": [
63 "pending",
64 "processing",
65 "sent",
66 "failed"
67 ]
68 }
69 }
70 }
71 },
72 {
73 "ordinal": 5,
74 "name": "recipient",
75 "type_info": "Text"
76 },
77 {
78 "ordinal": 6,
79 "name": "subject",
80 "type_info": "Text"
81 },
82 {
83 "ordinal": 7,
84 "name": "body",
85 "type_info": "Text"
86 },
87 {
88 "ordinal": 8,
89 "name": "metadata",
90 "type_info": "Jsonb"
91 },
92 {
93 "ordinal": 9,
94 "name": "attempts",
95 "type_info": "Int4"
96 },
97 {
98 "ordinal": 10,
99 "name": "max_attempts",
100 "type_info": "Int4"
101 },
102 {
103 "ordinal": 11,
104 "name": "last_error",
105 "type_info": "Text"
106 },
107 {
108 "ordinal": 12,
109 "name": "created_at",
110 "type_info": "Timestamptz"
111 },
112 {
113 "ordinal": 13,
114 "name": "updated_at",
115 "type_info": "Timestamptz"
116 },
117 {
118 "ordinal": 14,
119 "name": "scheduled_for",
120 "type_info": "Timestamptz"
121 },
122 {
123 "ordinal": 15,
124 "name": "processed_at",
125 "type_info": "Timestamptz"
126 }
127 ],
128 "parameters": {
129 "Left": [
130 "Timestamptz",
131 "Int8"
132 ]
133 },
134 "nullable": [
135 false,
136 false,
137 false,
138 false,
139 false,
140 false,
141 true,
142 false,
143 true,
144 false,
145 false,
146 true,
147 false,
148 false,
149 false,
150 true
151 ]
152 },
153 "hash": "cb6f48aaba124c79308d20e66c23adb44d1196296b7f93fad19b2d17548ed3de"
154}