You can filter
the database objects that are shown in the SQL Outline view by specifying
an object name or an SQL text filter pattern, or both.
Before you begin
Depending on your
license configuration, this functionality might not be available.
The SQL Outline view is populated when at least one of the following
items exists in a Java™ project
in your workspace:
- An interface that declares an annotated method that uses the pureQuery
API
- A pureQueryXML file that contains captured SQL statements
About this task
The SQL Outline
view lists the DB2® packages
and the Java source files that
contain the SQL statements. The view also shows the database objects
that the SQL statements reference.
To reduce the number of database
objects that are shown in the SQL Outline view, you can filter by
either or both of the following conditions:
- A database object name; that is, a schema name, a table name,
or a column name
- The SQL statements that reference the database objects
To filter by SQL statements, you provide an SQL text filter
pattern, which can contain SQL keywords, predicates, routine names,
and other text. The SQL text filter pattern must be specified in the
form of a regular expression whose syntax conforms to the Java Pattern class
Procedure
To filter database objects that are shown in the SQL
Outline view:
- Right-click in the SQL Outline view and then
select Filter. The Filter window
opens.
- To filter database objects by the name of a schema, table,
or column, type the schema name, qualified table name, or qualified
column name in the Database object name field.
- To filter by SQL statements, perform the following steps:
- Select the Use SQL text filter pattern check
box.
- Type the SQL keywords, predicates, or other text in
the SQL text filter pattern as a regular expression. For
example, to define a filter that consists of all SQL INSERT statements,
type the following SQL text filter pattern: (.*INSERT.*).
To define a filter that consists of all SELECT and INSERT statements,
type: (.*SELECT.*)|(.*INSERT.*).
- If the SQL text filter pattern that you specify is case
sensitive, select the Case sensitive check
box.
- Select how to use the SQL text filter pattern that you
specify.
- To show the database objects that are referenced in SQL statements
that match the SQL text filter pattern, select Use as inclusion
filter pattern.
- To show the database objects that are referenced in SQL statements
that do not match the SQL text filter pattern, select Use
as exclusion filter pattern.
- Click OK to apply the filter that
you specified.
Results
The database objects
that are shown on each page of the SQL Outline view are limited to
those that meet the filter conditions that you specified. The root
node on each page includes the notation "[Filtered]."