tps/database/reports/list_maps.sql

22 lines
691 B
MySQL
Raw Permalink Normal View History

2023-03-24 21:43:28 -04:00
SELECT
2024-09-28 17:13:57 -04:00
m.srce
,m.target
,m.regex->'regex'->>'function' func_name
,m.regex->'regex'->>'description' descr
,filter.v filters
,defn.v->> 'field' result_key_name
,defn.v->> 'key' target_json_path
,defn.v->>'regex' regex_expression
,defn.v->> 'flag' regex_options_flag
,defn.v->>'map' map_intention
,defn.v->>'retain' retain_result
,defn.rn target_item_number
2023-03-24 21:43:28 -04:00
FROM
tps.map_rm m
2024-09-28 17:13:57 -04:00
LEFT JOIN LATERAL jsonb_array_elements(m.regex->'regex'->'defn') WITH ORDINALITY defn(v, rn) ON true
LEFT JOIN LATERAL jsonb_array_elements(m.regex->'regex'->'where') WITH ORDINALITY filter(v, rn) ON true
2023-03-24 21:43:28 -04:00
ORDER BY
2024-09-28 17:13:57 -04:00
m.srce
,m.target
,defn.rn