{
  "db_name": "PostgreSQL",
  "query": "\n            SELECT\n                p.deployment_id,\n                p.id as probe_id,\n                p.active,\n                p.interval_seconds,\n                pr.executed_at as last_check,\n                pr.success as last_success\n            FROM probes p\n            LEFT JOIN LATERAL (\n                SELECT executed_at, success\n                FROM probe_results\n                WHERE probe_id = p.id\n                ORDER BY executed_at DESC\n                LIMIT 1\n            ) pr ON true\n            WHERE p.deployment_id = ANY($1)\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "deployment_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "probe_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 2,
        "name": "active",
        "type_info": "Bool"
      },
      {
        "ordinal": 3,
        "name": "interval_seconds",
        "type_info": "Int4"
      },
      {
        "ordinal": 4,
        "name": "last_check",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 5,
        "name": "last_success",
        "type_info": "Bool"
      }
    ],
    "parameters": {
      "Left": [
        "UuidArray"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      true,
      true
    ]
  },
  "hash": "9bb4d5647ccd79e42447f0ae62bbc99dec08fb8b4936748af9c65982384fffd7"
}
