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