SQL Queries - CAST Knowledge Base - Queries on artifacts - How to get the list of Artifacts per technology
Purpose of Query
The query present in this page helps us to get the list of artifacts belonging to any technology XYZ.
Applicable CAST Version
| Release | Yes/No |
|---|---|
| 8.3.x | ✅ |
| 8.2.x | ✅ |
| 8.1.x | ✅ |
| 8.0.x | ✅ |
| 7.3.x | ✅ |
Applicable RDBMS
| RDBMS | Yes/No |
|---|---|
| Oracle Server | ✅ |
| Microsoft SQL Server | ❓ |
| CSS2 | ✅ |
Query for CSS
SELECT *
FROM keys
WHERE OBJTYP IN
(SELECT DISTINCT t.IdTyp
FROM Typ t,
TypCat tc
WHERE t.IdTyp = tc.IdTyp
AND tc.IdCatParent IN
(SELECT Cat.IdCat
FROM Cat
WHERE CatNam LIKE 'APM_XXX_Artifact'
)
)
Query result example
To get the exact name of the category, you can check the metamodel of the used technology located under
C:\Program Files\CAST(7.3.x/8.0.x/8.1.x)\configuration\Languages\XYZ
XYZ is the name of the used technology.
Example -
To get the list of artifacts of type Oracle View in the Knowledge base, run following query:
SELECT *
FROM keys
WHERE OBJTYP IN
(SELECT DISTINCT t.IdTyp
FROM Typ t,
TypCat tc
WHERE t.IdTyp = tc.IdTyp
AND tc.IdCatParent IN
(SELECT Cat.IdCat
FROM Cat
WHERE CatNam LIKE ‘CAST_AST_Oracle_View’
)
)
“idkey”;“keynam”;“keylib”;“keytyp”;“keysubtyp”;“keyclass”;“keyprop”;“objtyp”;“idusrdevpro”;“keydevdat”;“keydevvlddat”;“status”;“sqlowner”
1539;“ENABLE_SUMMARY_DATES”;"";“XXXXXX”;-1;36120;0;138183;"???";“1970-01-01 00:00:00”;"";0;""
Query result interpretation
The above query lists the artifacts of desired type. Here in our example we have queried for type - Oracle View. Artifact - ENABLE_SUMMARY_DATES is of type Oracle View.
Query for Oracle
Same as CSS
Query result example
Same as CSS
Query result interpretation
Same as CSS
Query for SQL server
To be done
Query result example
To be done
Query result interpretation
To be done
Notes/comments
Related Pages