{
  "db_name": "PostgreSQL",
  "query": "\n            SELECT\n                id, notification_id, user_id, channel, delivery_priority, status, next_attempt, attempt_count\n            FROM notifications_deliveries\n            WHERE\n              status = $3\n              AND channel = $1\n              AND next_attempt <= NOW()\n            ORDER BY\n              delivery_priority DESC,\n              next_attempt ASC\n            LIMIT $2\n            FOR UPDATE\n            SKIP LOCKED\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Int8"
      },
      {
        "ordinal": 1,
        "name": "notification_id",
        "type_info": "Int8"
      },
      {
        "ordinal": 2,
        "name": "user_id",
        "type_info": "Int8"
      },
      {
        "ordinal": 3,
        "name": "channel",
        "type_info": "Varchar"
      },
      {
        "ordinal": 4,
        "name": "delivery_priority",
        "type_info": "Int4"
      },
      {
        "ordinal": 5,
        "name": "status",
        "type_info": "Varchar"
      },
      {
        "ordinal": 6,
        "name": "next_attempt",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 7,
        "name": "attempt_count",
        "type_info": "Int4"
      }
    ],
    "parameters": {
      "Left": [
        "Text",
        "Int8",
        "Text"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false,
      false,
      false,
      false
    ]
  },
  "hash": "5f7ce5881b9051f2a2e88577f8851a8e367c8914fa40ff2224dcb907284339d8"
}
