{
  "db_name": "PostgreSQL",
  "query": "\n          WITH RECURSIVE parents AS (\n            SELECT m.member_account_set_id, m.account_set_id\n            FROM cala_account_set_member_account_sets m\n            JOIN cala_account_sets s\n            ON s.id = m.account_set_id\n            WHERE m.member_account_set_id = $1\n\n            UNION ALL\n            SELECT p.member_account_set_id, m.account_set_id\n            FROM parents p\n            JOIN cala_account_set_member_account_sets m\n                ON p.account_set_id = m.member_account_set_id\n          ),\n          non_transitive_insert AS (\n            INSERT INTO cala_account_set_member_accounts (account_set_id, member_account_id)\n            VALUES ($1, $2)\n          ),\n          transitive_insert AS (\n            INSERT INTO cala_account_set_member_accounts (account_set_id, member_account_id, transitive)\n            SELECT p.account_set_id, $2, TRUE\n            FROM parents p\n          )\n          SELECT account_set_id, NULL AS now\n          FROM parents\n          UNION ALL\n          SELECT NULL AS account_set_id, NOW() AS now\n          ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "account_set_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "now",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Uuid"
      ]
    },
    "nullable": [
      null,
      null
    ]
  },
  "hash": "142f41e72aed810515c083aae2566a01b944a298a27d8b706d5d03633a769fa8"
}
