<< Click to Display Table of Contents >> CQL (Cimera Query Language) |
|
The CQL (Cimera Query Language) Window uses a SQL-style syntax to to find items in the Cimera Database.
•Selecting Menu > Query > Query name
•Selecting Menu > Query > New Query (CQL)
•Selecting Edit from the Manage Queries window
The Window
The CQL window has 3 main sections
•Query
•Search Results
•Dictionary
Query
Where the text of the query is entered.
Syntax Opens a window to help the user with syntax
Show/Hide Dictionary Shows or Hides the Dictionary
Save Saves the query. Currently this is specific to the current user on the current machine.
Run Query Executes all the CQL in the query box
Search Results
When the query is executed the items that match the criteria executed are displayed in an Item List
Dictionary
The Dictionary lists every Item Type, field, status etc than can be used in a CQL query.
The Dictionary is made visible/hidden by clicking Show Dictioinary / Hide Dictionary
Clicking any of the links in the Dictionary will copy the text into the Query box
Use the drop down in the top right to select the Item Type you wish to look at the fields for
Executing CQL
CQL can be executed in 3 ways
•Click Run Query to execute all the CQL
•Pressing F5 is the same as Run Query
•Select a subset of the code in the Query box and press F5 to execute the selected code. This is most useful when developing the CQL, especially when combined with /* comments */
My First CQL Query Walkthrough
1.Open the Dictionary, if it is not already open, by clicking Show Dictionary in the Query pane
2.Use the drop down to select the Item Type you want to query against. In this example a Problem
3.Click the Item Type name, Problem - this will add the text FIND Problem WHERE to the query box. Note if the query box is not blank it will just add the name of the Item Type and not FIND and WHERE
4.Click a field to query against, e.g. cistatus. The field will be added to the query
5.Add an operator to the query, e.g. =, <>
6.Click one of the Statuses that are in the Lifecycle for this Item Type - they are listed in Type Information at the top of the window.
If the Item Type you selected cannot be created (see Item Type Inheritance) then there will be no Statuses listed. Select an Inherited By Item Type and select one of its statuses.
7.Press F5 or click Run Query