| Line 3... |
Line 3... |
| 3 |
-- Provide the package id, name and count of package-versions
|
3 |
-- Provide the package id, name and count of package-versions
|
| 4 |
-- Match control via :MATCH
|
4 |
-- Match control via :MATCH
|
| 5 |
-- :MATCH 0 - Match any package name
|
5 |
-- :MATCH 0 - Match any package name
|
| 6 |
-- :MATCH 1 - Match Package name and Project Suffix
|
6 |
-- :MATCH 1 - Match Package name and Project Suffix
|
| 7 |
-- :MATCH 2 - Match exactly the package. Name, Version and Suffix
|
7 |
-- :MATCH 2 - Match exactly the package. Name, Version and Suffix
|
| - |
|
8 |
with
|
| - |
|
9 |
aa AS ( select NVL(v_ext,'LINK') as ext from package_versions where pv_id = :PV_ID),
|
| - |
|
10 |
bb AS (select pkg_id from package_versions where pv_id = :PV_ID)
|
| 8 |
select pkg.pkg_name, pkg.pkg_id, count(ppv.pv_id) AS count
|
11 |
select pkg.pkg_name, pkg.pkg_id, count(ppv.pv_id) AS count
|
| 9 |
from PACKAGE_DEPENDENCIES dep,
|
12 |
from PACKAGE_DEPENDENCIES dep,
|
| 10 |
package_versions pv,
|
13 |
package_versions pv,
|
| 11 |
package_versions ppv,
|
14 |
package_versions ppv,
|
| 12 |
packages pkg
|
15 |
packages pkg,
|
| - |
|
16 |
aa, bb
|
| 13 |
Where dep.DPV_ID = pv.pv_id
|
17 |
Where dep.DPV_ID = pv.pv_id
|
| 14 |
AND dep.PV_ID = ppv.pv_id
|
18 |
AND dep.PV_ID = ppv.pv_id
|
| 15 |
AND pkg.pkg_id = ppv.pkg_id
|
19 |
AND pkg.pkg_id = ppv.pkg_id
|
| 16 |
AND (pv.PV_ID = :PV_ID OR :MATCH != 2)
|
20 |
AND (pv.PV_ID = :PV_ID OR :MATCH != 2)
|
| 17 |
AND (NVL(pv.v_ext,'LINK') in ( select NVL(v_ext,'LINK') from package_versions where pv_id = :PV_ID ) OR :MATCH = 2 OR :MATCH = 0)
|
21 |
AND (NVL(pv.v_ext,'LINK') in ( aa.ext ) OR :MATCH = 2 OR :MATCH = 0)
|
| 18 |
AND (pv.PKG_ID in ( select pkg_id from package_versions where pv_id = :PV_ID) OR :MATCH = 2)
|
22 |
AND (pv.PKG_ID in ( bb.pkg_id ) OR :MATCH = 2)
|
| 19 |
GROUP BY pkg.pkg_name, pkg.pkg_id
|
23 |
GROUP BY pkg.pkg_name, pkg.pkg_id
|
| 20 |
ORDER BY UPPER(pkg.pkg_name)
|
24 |
ORDER BY UPPER(pkg.pkg_name)
|