Creating Queries to Retrieve Additional Attributes

You can create queries to retrieve additional attributes. These attributes could be added to SqlAttrQuery, but retrieving them in a separate query helps to avoid overloading that item. User-created queries are only called during reverse-engineering if their names are added to the ReversedQueries item.

To create a new query in a category, right-click the category and select New > Text Item. Enter an appropriate name, and then add the name to the ReversedQueries item.

For example, in the Oracle family of DBMSs, SqlColnListQuery is defined in the View category:
{OWNER ID, VIEW ID, VIEWCOLN ...}

select
   c.owner,
   c.table_name,
   c.column_name||', '
from
   sys.all_tab_columns c
where 1 = 1
   [and c.owner=%.q:OWNER%]
   [and c.table_name=%.q:VIEW%]
order by
   1, 2, c.column_id

This query retrieves view columns, and is enabled by adding it to ReversedQueries in the View category.

Note: Subqueries that are called with the EX keyword from within SqlAttrQuery or other queries (see Calling Sub-Queries with the EX Keyword) do not need to be added to ReversedQueries.