plscope.plscope_signatures_all.sql Maven / Gradle / Ivy
SELECT
ids.*
,DENSE_RANK() OVER (PARTITION BY SIGNATURE ORDER BY USAGE DESC) priority /* Prefer DEFINITION (OBJECT BODY) to DECLARATION (OBJECT SPECIFICATION)*/
FROM ALL_IDENTIFIERS ids
WHERE ids.USAGE IN ( 'DECLARATION', 'DEFINITION')
AND TYPE IN ( 'CONSTANT', 'FUNCTION', 'PROCEDURE' , 'VARIABLE' , 'TRIGGER' , 'SUBTYPE' , 'PACKAGE', 'OBJECT' , 'EXCEPTION' )
ORDER BY OWNER, OBJECT_TYPE,OBJECT_NAME,LINE,COL