db_query_script.sql
635 字节
/*
1. 查询依赖的查询集
*/
select * from metadata.query_sets where query_set_info->>'BindTableId' in (
select distinct table_id::text from ( /*element_id,table_info,table_type*/
select json_array_elements(to_json(table_info->'dependencyTables'))::text::int element_id,table_info,table_id,table_type
from metadata.tables where table_info->'dependencyTables'::text <>'null' and table_type in ('SubProcess','CalculateTable')
) a where a.element_id in (select table_id from metadata.tables where table_type in ('MainTable','SubTable','SideTable'))
order by table_id asc
) and context->>'operatorId' = '22'