{
  "db_name": "PostgreSQL",
  "query": "\n        SELECT\n            nt.external_id,\n            nt.workspace_id,\n            nt.service_name AS \"service_name!: ServiceName\",\n            nt.script_path,\n            nt.is_flow,\n            nt.webhook_token_hash,\n            nt.service_config,\n            nt.error,\n            nt.created_at,\n            nt.updated_at,\n            nt.summary\n        FROM\n            native_trigger nt\n        WHERE\n            nt.workspace_id = $1 AND\n            nt.service_name = $2 AND\n            ($5::text IS NULL OR nt.script_path = $5) AND\n            ($6::bool IS NULL OR nt.is_flow = $6) AND\n            (\n                (nt.is_flow = false AND EXISTS (\n                    SELECT 1 FROM script s\n                    WHERE s.workspace_id = nt.workspace_id\n                    AND s.path = nt.script_path\n                ))\n                OR\n                (nt.is_flow = true AND EXISTS (\n                    SELECT 1 FROM flow f\n                    WHERE f.workspace_id = nt.workspace_id\n                    AND f.path = nt.script_path\n                ))\n            )\n        LIMIT $3\n        OFFSET $4\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "external_id",
        "type_info": "Varchar"
      },
      {
        "ordinal": 1,
        "name": "workspace_id",
        "type_info": "Varchar"
      },
      {
        "ordinal": 2,
        "name": "service_name!: ServiceName",
        "type_info": {
          "Custom": {
            "name": "native_trigger_service",
            "kind": {
              "Enum": [
                "nextcloud",
                "google",
                "github"
              ]
            }
          }
        }
      },
      {
        "ordinal": 3,
        "name": "script_path",
        "type_info": "Varchar"
      },
      {
        "ordinal": 4,
        "name": "is_flow",
        "type_info": "Bool"
      },
      {
        "ordinal": 5,
        "name": "webhook_token_hash",
        "type_info": "Varchar"
      },
      {
        "ordinal": 6,
        "name": "service_config",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 7,
        "name": "error",
        "type_info": "Text"
      },
      {
        "ordinal": 8,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 9,
        "name": "updated_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 10,
        "name": "summary",
        "type_info": "Varchar"
      }
    ],
    "parameters": {
      "Left": [
        "Text",
        {
          "Custom": {
            "name": "native_trigger_service",
            "kind": {
              "Enum": [
                "nextcloud",
                "google",
                "github"
              ]
            }
          }
        },
        "Int8",
        "Int8",
        "Text",
        "Bool"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false,
      false,
      true,
      true,
      false,
      false,
      true
    ]
  },
  "hash": "b0775af41a9b54cce040bf37cae770e63dab12a1383a0855d105c061e4e4ca48"
}
