Came across a simple (useful) query that displays the types and thier hierarchy.
DQL>describe hierarchy persistent.
Displays a hierarchial structure of all “Persistent Objects”.
DQL> describe hierarchy dm_sysobject
Object hierarchy list
dm_sysobject
\ dmi_expr_code
\ dm_mount_point
\ dm_location
\ dm_docbase_config
\ dm_server_config
\ dm_policy
\ dm_registered
\ dm_folder
\ dm_cabinet
\ dm_xml_application
\ dm_category
\ dmc_topic
\ dmc_room
\ dmc_module
\ dmc_aspect_type
\ dmc_validation_module
P.S.: Found it through samson (Just below the toolbar : Query Topics -> Type Management + List tree of types known in docbase –> Generate Query)
Analyzing the above query, I gave a DQL to find out hierarchy of dm_sysobject and it works perfect. cool
DQL>describe hierarchy dm_sysobject
(lists hierarchically all the sub types of sysobject ).
This will be handy sometimes to see who all extend a custom object type.
Here is the DQL to find direct sub types of a given type
DQL> select name from dm_type where super_name =’dm_sysobject’;
(This query doesn’t list the indirect sub types)
Nope… doesn’t work. “describe” is not a keyword as it throws an error.
Comment by Nick — June 6, 2008 @ 8:20 pm
It does work and “describe” is a keyword that describes the type(definition).
It works in Samson. On IDQL32 I see it doesn’t work.
Samson does this internally posting multiple queries using the super_name.
DQL>select name from dm_type where super_name =’dm_document
then gets the individual sub types of dm_document. So this only a feature of Samson.
On IDQL32 we need to live with multiple queries and collections
Hope this helps
Comment by Rajendra — June 13, 2008 @ 2:26 pm
Good post! Alternative, you could also use Oracle SQLPLUS type of tool and execute the following SQL command to achieve the same result. select lpad(‘ ‘,level*4)||name from knadmin.dm_type_s start with name = ‘dm_sysobject’ connect by prior name = super_name
Comment by Zan — August 14, 2008 @ 9:12 am
Sorry forgotten to mention to replace ‘knadmin’ with your own schema name.
Comment by Zan — August 14, 2008 @ 9:14 am
Excellent post.
Comment by Khaleel — September 17, 2008 @ 11:29 am