{
  "db_name": "PostgreSQL",
  "query": "\n            SELECT\n                td.table_name,\n                COALESCE(\n                    json_agg(\n                        json_build_object(\n                            'linked_name', ltd.table_name,\n                            'required', tdl.is_required\n                        )\n                    ) FILTER (WHERE ltd.id IS NOT NULL),\n                    '[]'\n                ) as dependencies\n            FROM table_definitions td\n            LEFT JOIN table_definition_links tdl ON td.id = tdl.source_table_id\n            LEFT JOIN table_definitions ltd ON tdl.linked_table_id = ltd.id\n            WHERE td.profile_id = $1\n            GROUP BY td.table_name\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "table_name",
        "type_info": "Text"
      },
      {
        "ordinal": 1,
        "name": "dependencies",
        "type_info": "Json"
      }
    ],
    "parameters": {
      "Left": [
        "Int8"
      ]
    },
    "nullable": [
      false,
      null
    ]
  },
  "hash": "e23802d20f7f929810f5d294a36d23eca89d4abf6aa7d7d4b4fee9147e153b57"
}
