Download goalert/notification/queries.sql from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/goalert/notification/queries.sql
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/goalert/notification/queries.sql
-
curl -L -o queries.sql https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/goalert/notification/queries.sql
1.11 kB
| -- name: NfyLastMessageStatus :one | |
| SELECT | |
| sqlc.embed(om), | |
| cm.dest AS cm_dest, | |
| ch.dest AS ch_dest | |
| FROM | |
| outgoing_messages om | |
| LEFT JOIN notification_channels ch ON om.channel_id = ch.id | |
| LEFT JOIN user_contact_methods cm ON om.contact_method_id = cm.id | |
| WHERE | |
| message_type = $1 | |
| AND contact_method_id = $2 | |
| AND om.created_at >= $3; | |
| -- name: NfyManyMessageStatus :many | |
| SELECT | |
| sqlc.embed(om), | |
| cm.dest AS cm_dest, | |
| ch.dest AS ch_dest | |
| FROM | |
| outgoing_messages om | |
| LEFT JOIN notification_channels ch ON om.channel_id = ch.id | |
| LEFT JOIN user_contact_methods cm ON om.contact_method_id = cm.id | |
| WHERE | |
| om.id = ANY ($1::uuid[]); | |
| -- name: NfyOriginalMessageStatus :one | |
| SELECT | |
| sqlc.embed(om), | |
| cm.dest AS cm_dest, | |
| ch.dest AS ch_dest | |
| FROM | |
| outgoing_messages om | |
| LEFT JOIN notification_channels ch ON om.channel_id = ch.id | |
| LEFT JOIN user_contact_methods cm ON om.contact_method_id = cm.id | |
| WHERE | |
| message_type = 'alert_notification' | |
| AND alert_id = $1 | |
| AND (contact_method_id = $2 | |
| OR channel_id = $3) | |
| ORDER BY | |
| sent_at | |
| LIMIT 1; | |