SQL Queries - CAST Knowledge Base - Queries on Module - Module Content Summary and Detail - How to retrieve the number of objects per module and the object details

Purpose of Query

The queries on this page provide information on the Module content summary and detail similar to the Module Content seen in CAST-MS (associated documentation for this is here:  CMS - User Defined Module editor).  One query provides the number of objects per type, per subset and per module in a local base, which can be done based on an individual module.  The details of the objects in a module is also shown in another query.

Applicable CAST Version
Release
Yes/No
8.3.x(tick)
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
7.3.x(tick)
Applicable RDBMS
RDBMS
Yes/No
Oracle Server(question)
Microsoft SQL Server(question)
CSS2(tick)
Query for CSS

This query provides the number of objects and details for all modules:

SELECT   k0.KeyNam              AS "Module Name",
         k.KeyNam               AS "Subset Name",
         t.TypNam               AS "Type Name"  ,
         COUNT(coa.OBJECT_TYPE) AS "Objects Number"
FROM     SETROOT sr
         JOIN Keys k0
         ON       k0.IdKey = sr.IDSET
         JOIN CTT_OBJECT_APPLICATIONS coa
         ON       coa.APPLICATION_ID = sr.IDROOT
         JOIN Keys k
         ON       k.IdKey = sr.IDROOT
         JOIN Typ t
         ON       t.IdTyp = coa.OBJECT_TYPE
GROUP BY k0.KeyNam,
         k.KeyNam ,
         t.TypNam
ORDER BY k0.KeyNam,
         k.KeyNam ,
         t.TypNam
Query result example
 

"ora_test full content";"ora_test full content_CAST_Oracle_Subset";"CAST_Oracle_Schema";5
"ora_test full content";"ora_test full content_CAST_Oracle_Subset";"CAST_Oracle_Sequence";3
"ora_test full content";"ora_test full content_CAST_Oracle_Subset";"CAST_Oracle_TableColumn";619
"ora_test full content";"ora_test full content_CAST_Oracle_Subset";"CAST_Oracle_Subset";1

Query result interpretation

 The query provides the module name, the subset name, the type, and the count of each objects for that type in that module.

If you want to qualify it for a specific module then you can add the line:

Where k0.keynam = '<your Module Name>'

before the GROUP BY line

.You can get the module name for a specific object by using this query:  SQL Queries - CAST Knowledge Base - Queries on Module - Module content and properties

This query provides the details on the objects for a specific module (the name of the specific module needs to be provided - also please be aware that this query may return a large set of data for a module with a large number of objects).  You can get the module name for a specific object by using this query:  SQL Queries - CAST Knowledge Base - Queries on Module - Module content and properties 

SELECT k0.KeyNam AS "Module Name" ,
K1.KeyNam AS "Object Name" ,
o.fullname AS "Full Name" ,
rp.path AS "Object Full Path",
t.typnam AS "Type"
FROM SETROOT sr
JOIN Keys k0
ON k0.IdKey = sr.IDSET
JOIN CTT_OBJECT_APPLICATIONS coa
ON coa.APPLICATION_ID = sr.IDROOT
JOIN Keys k
ON k.IdKey = sr.IDROOT
JOIN Typ t
ON t.IdTyp = coa.OBJECT_TYPE
JOIN keys k1
ON k1.idkey = coa.object_id
JOIN OBJFULNAM o
ON o.idobj = k1.idkey
JOIN objfilref ofr
ON k1.idkey = ofr.idobj
JOIN refpath rp
ON ofr.idfilref =rp.idfilref
WHERE k0.keyNam = '<your Module Name>'
Query result example
 "mongo full content";"String";"java.lang.String";"C:\ProgramData\CAST\CAST\CASTMS\LISA\9d3f2d5eaecb4f47888f01fa1a6cdf4f\Scre7302b2c3216410c88828a6dedba1541\JavaExtractedFiles\Classes\java\lang\String_68ec49bc02991681.java";"JV_CLASS"
"mongo full content";"String";"java.lang.String";"C:\ProgramData\CAST\CAST\CASTMS\LISA\15aa4bd48ead47fb97244bde0395c324\Scr6e3556c049054d72a7dc2629512b4095\JavaExtractedFiles\Classes\java\lang\String_8d8a37479ba8b8a0.java";"JV_CLASS"
Query result interpretation

 The query provides the details on the objects in the module including the object name, type, and path

Query for Oracle

Query result example

Query result interpretation

Query for SQL server

Query result example

Query result interpretation

Notes/comments



Related Pages