Query Lifecycle Operations¶
Once a Query is designed, there are several operations a user can do to maintain the lifecycle of the created query. Some of these operations are directly handled by the tool itself, while the rest through other mediums. Below are the main states once a Query is designed,
- Preview Query
- Save a Query
- Publish the Query
- Edit/Delete a Query
- Utilizing a Published Query
- Add to an ACP
After adding attributes from the selected entity(s), a user can populate the designed draft. This functionality fetches data from the database and displays it for the selected attributes.
Save a Query¶
The query draft can be saved after the query is designed using the
Save button. To save the query, the user must provide a mandatory query name and a description. Saving the draft enables features such as publishing and adding it to an Application Configuration Package (ACP).
Publish the Query¶
Saving a draft will enable the
Publish button; clicking on the publish button will publish the query to the database. This will enable features such as utilizing the query through the API explorer and a PL/SQL API.
Synchronize button will be enabled to the user if they make a change and save an already published query.
Unpublish button will be enabled once the query is published to unpublish a saved query from the database. Unpublishing will make the query removable.
Edit/Delete a Query¶
If the user wishes to edit/delete a query, it can be done by clicking on the
Edit Query button or
Delete button in the 'Query Overview' page. Navigate to 'Query Overview' page from the Aurena client. To delete a query, the query must be unpublished.
Utilizing a Published Query¶
Two main functionalities can be performed by a published query,
Consume through API explorer¶
A published query can be consumed through an API endpoint. To view the Rest API Documentation and Specifications, navigate to the API Explorer from the Aurena Client and search for the query by the 'Query Projection' column in the 'Query Overview' page
Generate SQL statement¶
If the user wants to get the generated SQL statement for a published query, it can be fetched from
Query_Designer_Sql_Util_API.Generate_Sql_Statement PL/SQL method. This function accepts the query name as a parameter(VARCHAR2) and returns the SQL statement(VARCHAR2).
DECLARE sql_statement_ VARCHAR2(2000); BEGIN sql_statement_ := Query_Designer_Sql_Util_API.Generate_Sql_Statement('QDWorkflowDemo'); END;
Add to an ACP¶
Once a query is saved click on the
Query Overview button; this will open up the Query Overview page. Select the respective query and click on
Application Configuration Package button. A user can either create a new ACP or add to an existing ACP.