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