Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| 2000_concepts:0600_data_retrieval:0100_config_queries [2026/08/13 00:53] – ↷ Page moved from docs:2000_concepts:0600_data_retrieval:0100_config_queries to 2000_concepts:0600_data_retrieval:0100_config_queries localdev | 2000_concepts:0600_data_retrieval:0100_config_queries [2026/08/13 07:20] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| The concept of a query in **AwareIM** includes both data search criteria and a particular presentation of the found data to the user (grid, calendar, chart, tree etc). Irrespective of the implementation the options for data presentation are for the most part the same - whether it's a standard query, a stored procedure or raw SQL. | The concept of a query in **AwareIM** includes both data search criteria and a particular presentation of the found data to the user (grid, calendar, chart, tree etc). Irrespective of the implementation the options for data presentation are for the most part the same - whether it's a standard query, a stored procedure or raw SQL. | ||
| - | When defining a query, the configurator has to indicate the business object, (or [[docs:2000_concepts: | + | When defining a query, the configurator has to indicate the business object, (or [[2000_concepts: |
| The next step when defining a query is to indicate the conditions of search – only those instances of the business object that have attribute values matching the specified conditions will be retrieved by the query. for queries implemented as stored procedures or SQL SELECT statements, this step is done inside the stored procedure or SQL itself. For standard queries conditions of the search can be specified using Query Builder View as explained below or as part of the FIND action (if working in the Textual View) | The next step when defining a query is to indicate the conditions of search – only those instances of the business object that have attribute values matching the specified conditions will be retrieved by the query. for queries implemented as stored procedures or SQL SELECT statements, this step is done inside the stored procedure or SQL itself. For standard queries conditions of the search can be specified using Query Builder View as explained below or as part of the FIND action (if working in the Textual View) | ||
| Line 31: | Line 31: | ||
| It is also possible to indicate attributes of objects related to the related objects, for example, '' | It is also possible to indicate attributes of objects related to the related objects, for example, '' | ||
| - | The configurator may indicate that instances of a business object found by a query should be sorted by a particular attribute(s) in a particular order and also indicate how these instances should be displayed in the Operation Mode – see [[docs:2000_concepts: | + | The configurator may indicate that instances of a business object found by a query should be sorted by a particular attribute(s) in a particular order and also indicate how these instances should be displayed in the Operation Mode – see [[2000_concepts: |
| - | Configuration of queries is described in more detail in the [[docs:2500_config_apps: | + | Configuration of queries is described in more detail in the [[2500_config_apps: |
| - | <callout | + | <alert type=" |
| + | **note** | ||
| - | <callout | + | If a query searches for instances of business objects belonging to a business object group, the conditions of the query may only use attributes common to all members of the group (see [[2000_concepts: |
| + | |||
| + | < | ||
| + | **note** | ||
| + | |||
| + | It is possible to define a query with conditions that use attributes of a business object that the query is not searching for (they are also called // | ||
| <code aim>FIND Account WHERE Account.OwnerName = Customer.Name </ | <code aim>FIND Account WHERE Account.OwnerName = Customer.Name </ | ||
| Line 46: | Line 52: | ||
| - | Where does // | + | Where does // |
| - | See also [[docs:2000_concepts: | + | See also [[2000_concepts: |
| - | </callout> | + | </alert> |
| ===== Defining Queries Implemented as Stored Procedures===== | ===== Defining Queries Implemented as Stored Procedures===== | ||
| Line 60: | Line 66: | ||
| This stored procedure has two parameters - the second is hardcoded and the first one is initialized from the object in Context (ParamObject). | This stored procedure has two parameters - the second is hardcoded and the first one is initialized from the object in Context (ParamObject). | ||
| - | <callout | + | <alert type=" |
| + | **note** | ||
| When a configurator defines a new **AwareIM** query implemented as stored procedure and the stored procedure already exists, a developer can initialize the new query from the list of stored procedures available in the database and generate an appropriate EXEC_SP statement. | When a configurator defines a new **AwareIM** query implemented as stored procedure and the stored procedure already exists, a developer can initialize the new query from the list of stored procedures available in the database and generate an appropriate EXEC_SP statement. | ||
| - | </callout> | + | </alert> |
| + | |||
| + | <alert type=" | ||
| + | **note** | ||
| - | <callout type=" | ||
| **AwareIM** automatically provides support for dynamic paging, dynamic sorting and dynamic filtering of records returned by queries implemented as stored procedures. However, you need to know the following: | **AwareIM** automatically provides support for dynamic paging, dynamic sorting and dynamic filtering of records returned by queries implemented as stored procedures. However, you need to know the following: | ||
| - Support for dynamic paging, sorting and filtering is only provided for MySQL and SQL Server databases. | - Support for dynamic paging, sorting and filtering is only provided for MySQL and SQL Server databases. | ||
| Line 71: | Line 81: | ||
| %%SELECT...%%\\ | %%SELECT...%%\\ | ||
| %%-- END MAIN SELECT%%\\ | %%-- END MAIN SELECT%%\\ | ||
| - | </callout> | + | </alert> |
| ===== Defining Queries Implemented as SQL SELECT Statements ===== | ===== Defining Queries Implemented as SQL SELECT Statements ===== | ||