In the package %Dictionary you can query all information about classes.
To list all properties before compilation (columns):
SELECT Class.Name AS ClassName, Prop.Name AS PropertyName, Prop.Type
FROM %Dictionary.ClassDefinition AS Class
INNER JOIN %Dictionary.PropertyDefinition AS Prop ON Prop.parent = Class.%ID
WHERE Class.Name = 'Sample.Person'
ClassName
PropertyName
Type
Sample.Person
Age
%Integer
Sample.Person
DOB
%Date
Sample.Person
FavoriteColors
%String
Sample.Person
Home
Address
Sample.Person
Name
%String
Sample.Person
Office
Address
Sample.Person
SSN
%String
Sample.Person
Spouse
Person
To list all properties after compilation (columns):
SELECT Class.Name AS ClassName, Prop.Name AS PropertyName, Prop.Type
FROM %Dictionary.CompiledClass AS Class
INNER JOIN %Dictionary.CompiledProperty AS Prop ON Prop.parent = Class.%ID
WHERE Class.Name = 'Sample.Person'
the contents of those %Dictionary tables is a little geared towards class/object models. If you want a more SQL-focused view on your tables, you can look at the INFORMATION_SCHEMA package, which adheres to mainstream JDBC/ODBC dictionary structure and is used by mainstream SQL and BI tools like DBeaver, VSCode-SQLTools, Tableau, PowerBI, etc
Note you'll need to tick the "System" checkbox when browsing this schema in the System Management Portal.
Bellow the query in the INFORMATION_SCHEMA tables:
SELECT Tables.TABLE_SCHEMA, Tables.TABLE_NAME, Columns.COLUMN_NAME, Columns.DATA_TYPE
FROM INFORMATION_SCHEMA.TABLES AS Tables
INNER JOIN INFORMATION_SCHEMA.COLUMNS AS Columns
ON (Columns.TABLE_SCHEMA = Tables.TABLE_SCHEMA) AND (Columns.TABLE_NAME = Tables.TABLE_NAME)
WHERE (Tables.TABLE_SCHEMA = 'Sample') AND (Tables.TABLE_NAME = 'Person')
Hi Meenakshi,
In the package %Dictionary you can query all information about classes.
To list all properties before compilation (columns):
To list all properties after compilation (columns):
the contents of those %Dictionary tables is a little geared towards class/object models. If you want a more SQL-focused view on your tables, you can look at the INFORMATION_SCHEMA package, which adheres to mainstream JDBC/ODBC dictionary structure and is used by mainstream SQL and BI tools like DBeaver, VSCode-SQLTools, Tableau, PowerBI, etc
Note you'll need to tick the "System" checkbox when browsing this schema in the System Management Portal.
Thanks Benjamin for the explanation,
Bellow the query in the INFORMATION_SCHEMA tables: