Catalog Explorer
The Catalog Explorer docked in the Designer
The Catalog Explorer is the central viewer for the Relational Model Data in your LLBLGen Pro project and the entrance point for performing actions on these elements. LLBLGen Pro has a catalog explorer which is multi-selection aware and offers a rich feature set per node through context menus. It's a very important part of the designer especially for users who want to work database-first.
The Catalog Explorer has a detail pane which opens in the central tab
area of the designer, called the Catalog Details Viewer. You can
open this viewer by selecting one or more nodes in the Catalog Explorer
and press Ctrl-Shift-D
or right-click on the selected nodes and select
Show Details....
This viewer is read-only and gives a more detailed view on various elements available in the Catalog Explorer, like type details of entity fields. Once the Catalog Details Viewer is open, clicking on a node in the catalog explorer will show its details in the viewer pane.
The main parts of the catalog explorer are explained below:
The main Catalog Explorer elements
The following main elements are available in the Catalog Explorer:
- Search
- At the top of the Catalog Explorer a search box is present which allows you to search on every node in the tree by typing a part of the name of the node. All nodes which name contains the typed text are shown, the rest of the nodes are hidden. Removing the typed text by clicking the X button in the search text box will restore the tree as it was before the search. Searching is case insensitve. The search panel supports a few operators to help with fine-tuning your search. Please see the table below:
Character | Description | Example |
---|---|---|
* |
The 'Contains' operator. It's applied by default so it's not really necessary to specify this operator. | *Order will match Order but also BackOrders |
^ |
The 'StartsWith' operator. Use it to match the search text only at the start of names. | ^Order will match with Order and OrderCollection , but not with BackOrders |
~ |
The 'Like' operator. When specified, use a % character to specify wildcards |
~%der will match with Order and PreOrder but not with BackOrders . |
= |
The 'Equals' operator. Use this to get exact matches. | =Order will match Order but not PreOrder or BackOrders |
- Relational Model Data root node
- This root node, which is also available in the Project Explorer, is the central hub for Relational Model Data oriented functionality like adding relational model data from a database, or adding a new Relational Data Storage container for a database.
- Relational Model Data Storage nodes
- Relational Model data, be it relational model data retrieved from a relational database (database first) or generated by the designer from entity definitions (model first), is stored in Relational Model Data Storage containers, which are visible below the Relational Model Data node.
- Catalog nodes
- Every populated catalog is represented by a node right below the Relational Data Storage container node it belongs to. Several databases support multiple catalogs per project. If the database doesn't support the catalog concept (like Oracle), the 'Default' catalog is used as a place holder.
- Schema nodes
- A populated catalog has at least one Schema. A Schema is a container for tables, views, stored procedures and the like. When the database doesn't support the schema concept (like Access, MySql, Firebird), the 'Default' schema is used as a place holder
- Sequence nodes
- There are two kinds of sequences: sequences stored inside a schema (like Oracle and PostgreSql use) and system sequences which are not placed inside a schema but are available through the used RDBMS, like in SQL Server.
- Table, View, Stored Procedure, Table Valued Function nodes
- These nodes represent Table, View, Stored Procedure and Table Valued Function definitions in the Relational Model Data. Beneath these nodes are available: Field, Foreign Key Constraint, Unique Constraint, Parameter and Resultset nodes
Every node in the Catalog Explorer, if applicable, has a context menu which offers functionality on that node or a group of selected nodes of that same type (e.g. a selected set of table definition nodes).
The Catalog Explorer is the starting point for when you want to reverse engineer for example entity definitions from elements found in the Relational Model Data: select the elements you want to reverse engineer and right-click the elements to bring up the context menu to select the element type you want to reverse engineer the elements into.
You can also right-click for example a Schema or a Catalog to bulk-reverse engineer all elements contained in these containers. All reverse engineering activity uses the Reverse Engineering Element Editor to select the elements to reverse engineer, so it's not necessary to select all tables and all views in a catalog or schema first to reverse engineer them all.
Creating SELECT queries for elements
The designer offers an easy way to create different SELECT
queries in string form for tables, views and table-valued functions. It will copy the created queries to the clipboard so you can execute them with e.g. the SQL Editor tab. To do so, right-click the table, view or table-valued function in the catalog explorer and select one of the following options:
- Create Select All SQL Query to Clipboard, which will create a
SELECT <all fields> FROM <element>
query and copy it to the clipboard. - Create Select Top 100 SQL Query to Clipboard, which will create a
SELECT TOP 100 <all fields> FROM <element>
query and copy it to the clipboard. The 'Top 100' specification is in the syntax of the target database, so if e.g. a database supports LIMIT n, it'll be a LIMIT n suffix.
<element>
in the queries above are the table or view name (with catalog and schema name) for tables and views and a call to the table-valued function in the case of a table-valued function. For table-valued-functions the parameters are specified as constants with a comment with the name of the parameter, e.g. 0 /*categoryid*/