Data Query
Introduction
Data Query is a powerful tool used to request and manipulate data results from a database. It serves as a means to retrieve specific information based on predefined criteria.
Example: Tickets, Agents, Users
Key components of Data Query
Name:
- The "Name" property provides a unique identifier for the Data Query. It is used to reference and execute the query in various parts of the application.
Description:
- The "Description" property allows you to provide a brief explanation or documentation for the purpose of the Data Query. It helps developers and other stakeholders understand the intended use and functionality of the data query.
Documentation:
- Allows users to document and store information about specific Data Query in the project. Write notes, explanations, or guidelines related to Data Query. Facilitates collaboration by providing a shared space for notes and documentation.
Enable Synchronization:
- The "Enable Synchronization" property determines whether synchronization with the client is enabled for this query. Enabling synchronization allows real-time updates to be pushed to the client when data changes.
Inputs:
The "Inputs" property allows you to specify the parameters (variables) that the query can accept. Data Queries by allowing users to filter and customize the data retrieved from the database. Inputs act as parameters that can be passed to a query, enabling dynamic and tailored data fetching. Inputs provide flexibility, allowing dynamic customization of query results.
Example: In a query to get articles by title, the title is an input parameter that determines which articles are retrieved.
Key components of Inputs:
Name: The "Name" property provides a unique identifier for the input parameter within the Data Query. It is used to reference and access the input parameter in the query's code.
inputs: - name: "articleTitle" # other input properties...
Type: The "Type" property specifies the data type of the input parameter. It helps define the expected format of the input value (e.g., String, Integer, Double, etc).
inputs: - name: "articleTitle" type: "String" # other input properties...
Collection: The "Collection" property indicates whether the input represents a single value or a collection (list) of values. It allows flexibility in handling single values or multiple values for the input.
inputs: - name: "tags" type: "String" collection: true # other input properties...
Required: The "Required" property determines whether the input is mandatory or optional. If set to true, the query expects the input to be provided; otherwise, it may be omitted.
inputs: - name: "articleTitle" type: "String" required: true # other input properties...
Validation: The "Validations" property allows you to define validation rules for the input. It enables you to enforce specific conditions or constraints on the input value.
Error Message: The "Error Message" allows you to specify a custom error message that will be displayed when the validation rule is not satisfied. You can provide a clear and descriptive error message to help users understand why the validation failed.
Expression: The "Expression" allows you to define a custom expression or condition that will be evaluated to determine if the validation rule is satisfied.
inputs: - name: "age" type: "Int" validations: - expression: "value >= 0" errorMessage: "Age must be a non-negative integer." # other input properties...
Code Editor:
- Definition: The "Code" contains the logic and implementation details of the Data Query.
- Usage: It defines the actual behavior that the query performs when executed. Developers write custom code to retrieve and manipulate data.
Duplicate, Edit, Delete in Option Sets:
To duplicate, edit, delete the inputs in the data query.
-
ON THIS PAGE
- Introduction
- Key components of Data Query