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