{
  "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 completed_job.workspace_id = $1 AND parent_job IS NULL AND is_skipped = False ORDER BY started_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": "on_recovery",
        "type_info": "Varchar"
      },
      {
        "ordinal": 15,
        "name": "on_failure_times",
        "type_info": "Int4"
      },
      {
        "ordinal": 16,
        "name": "on_failure_exact",
        "type_info": "Bool"
      },
      {
        "ordinal": 17,
        "name": "on_failure_extra_args",
        "type_info": "Json"
      },
      {
        "ordinal": 18,
        "name": "on_recovery_times",
        "type_info": "Int4"
      },
      {
        "ordinal": 19,
        "name": "on_recovery_extra_args",
        "type_info": "Json"
      },
      {
        "ordinal": 20,
        "name": "ws_error_handler_muted",
        "type_info": "Bool"
      },
      {
        "ordinal": 21,
        "name": "retry",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 22,
        "name": "summary",
        "type_info": "Varchar"
      },
      {
        "ordinal": 23,
        "name": "no_flow_overlap",
        "type_info": "Bool"
      },
      {
        "ordinal": 24,
        "name": "tag",
        "type_info": "Varchar"
      },
      {
        "ordinal": 25,
        "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,
      true,
      true,
      true,
      true,
      true,
      true,
      false,
      true,
      true,
      false,
      true,
      null
    ]
  },
  "hash": "4422b7183ede17a9cbde4afae41be4da5447020e39398deedbcca9121492834a"
}
