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