{
  "db_name": "PostgreSQL",
  "query": "SELECT schedule.*, t.jobs FROM schedule, LATERAL ( SELECT ARRAY (SELECT json_build_object('id', id, 'success', success, 'duration_ms', duration_ms) FROM completed_job WHERE\n        completed_job.schedule_path = schedule.path AND schedule.workspace_id = completed_job.workspace_id AND parent_job IS NULL ORDER BY created_at DESC LIMIT 20) AS jobs ) t\n        WHERE schedule.workspace_id = $1 ORDER BY schedule.edited_at desc LIMIT $2 OFFSET $3",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "workspace_id",
        "type_info": "Varchar"
      },
      {
        "ordinal": 1,
        "name": "path",
        "type_info": "Varchar"
      },
      {
        "ordinal": 2,
        "name": "edited_by",
        "type_info": "Varchar"
      },
      {
        "ordinal": 3,
        "name": "edited_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 4,
        "name": "schedule",
        "type_info": "Varchar"
      },
      {
        "ordinal": 5,
        "name": "enabled",
        "type_info": "Bool"
      },
      {
        "ordinal": 6,
        "name": "script_path",
        "type_info": "Varchar"
      },
      {
        "ordinal": 7,
        "name": "args",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 8,
        "name": "extra_perms",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 9,
        "name": "is_flow",
        "type_info": "Bool"
      },
      {
        "ordinal": 10,
        "name": "email",
        "type_info": "Varchar"
      },
      {
        "ordinal": 11,
        "name": "error",
        "type_info": "Text"
      },
      {
        "ordinal": 12,
        "name": "timezone",
        "type_info": "Varchar"
      },
      {
        "ordinal": 13,
        "name": "on_failure",
        "type_info": "Varchar"
      },
      {
        "ordinal": 14,
        "name": "jobs",
        "type_info": "JsonArray"
      }
    ],
    "parameters": {
      "Left": [
        "Text",
        "Int8",
        "Int8"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false,
      false,
      false,
      true,
      false,
      false,
      false,
      true,
      false,
      true,
      null
    ]
  },
  "hash": "dc4316a8646dc642ed12c12d8673aa1ed44c551b3174c49655defacdf49880c7"
}
