fixed loading materialized views in oracle

This commit is contained in:
Jan Prochazka 2023-01-01 19:50:19 +01:00
parent 0c795e33c3
commit 6c4b56a28b

View File

@ -1,15 +1,19 @@
module.exports = `
select owner as schema_name,
SELECT owner as schema_name,
mview_name pure_name,
container_name,
query as definition,
ora_hash(query, 'MD5') as "hash_code"
--refresh_mode,
--refresh_method,
--build_mode,
--last_refresh_date,
--ompile_state
from all_mviews
'' || trim(
extractvalue(
dbms_xmlgen.getxmltype('SELECT query
FROM all_mviews
WHERE mview_name=''' ||
MVIEW_NAME || ''' AND
owner = ''' ||
owner || ''''
),
'//text()'
)) definition
FROM all_mviews
where mview_name=OBJECT_ID_CONDITION
order by owner, mview_name
`;
`;