{
  "db_name": "PostgreSQL",
  "query": "\n        SELECT DISTINCT\n            p.id, p.name,\n            p.status as \"status: ProjectStatus\",\n            p.access_class,\n            p.owner_user_id, p.owner_team_id,\n            p.finalizers,\n            p.created_at, p.updated_at\n        FROM projects p\n        WHERE\n            p.owner_user_id = $1\n            OR EXISTS(\n                SELECT 1 FROM team_members tm\n                WHERE tm.team_id = p.owner_team_id\n                AND tm.user_id = $1\n            )\n            OR EXISTS(\n                SELECT 1 FROM service_accounts sa\n                WHERE sa.project_id = p.id\n                AND sa.user_id = $1\n                AND sa.deleted_at IS NULL\n            )\n        ORDER BY p.created_at DESC\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "name",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "status: ProjectStatus",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "access_class",
        "type_info": "Text"
      },
      {
        "ordinal": 4,
        "name": "owner_user_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 5,
        "name": "owner_team_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 6,
        "name": "finalizers",
        "type_info": "TextArray"
      },
      {
        "ordinal": 7,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 8,
        "name": "updated_at",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      true,
      true,
      false,
      false,
      false
    ]
  },
  "hash": "ab57a36c12fae1f789bb71836a79678154431b00c5dd588d811d6c98ccf614a6"
}
