Telescope (core)
SQL - Como consultar estruturas de elementos no repositório?
ADS.FAQ-6916
Monta uma lista de estruturas dos elementos existentes no repositório, tipo SISTEMA, SISTEMA.ENTIDADE, SISTEMA.ENTIDADE,ATRIBUTO, SISTEMA.INTERFACE, etc.
select distinct coalesce(t4.tipo_componente || '.' , '') || coalesce(t3.tipo_componente || '.' , '') || coalesce(t2.tipo_componente || '.' , '') || t1.tipo_componente
from componentes c1
join tipos_componentes t1 on t1.id = c1.tipo_componente_id
left join componentes c2 on c2.id = c1.pai_comp_id
left join tipos_componentes t2 on t2.id = c2.tipo_componente_id
left join componentes c3 on c3.id = c2.pai_comp_id
left join tipos_componentes t3 on t3.id = c3.tipo_componente_id
left join componentes c4 on c4.id = c3.pai_comp_id
left join tipos_componentes t4 on t4.id = c4.tipo_componente_id
order by 1