Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
docs:2000_concepts:0600_data_retrieval:0100_config_queries [2026/07/08 07:32] aware_admindocs:2000_concepts:0600_data_retrieval:0100_config_queries [2026/07/09 10:22] (current) aware_admin
Line 3: Line 3:
 ====== Configuring Queries ====== ====== Configuring Queries ======
  
-Queries can be defined at the configuration stage - a user can run such pre-configured queries in the Operation Mode. Pre-configured queries can also be referenced by rules (see ''[[a_f:a:find|FIND]]'' action) +AwareIM Queries are used to retrieve data from the system using specific search criteria and present results of the search to the user. Therefore AwareIM queries combine search with data presentation. Most queries are defined at the configuration stage (predefined queries, as oppsed to user-defined ones) a configurator defines them in the Configuration Tool and a user runs them in the Operation Mode. Pre-configured queries can be referenced by rules - FIND. PICK FROM. DISPLAY and other actions of the Rule Language.  
-Queries can be implemented either by the ''[[a_f:a:find|FIND]]'' or ''[[a_f:a:exec_sp|EXEC SP]]'' or ''[[a_f:a:exec_sql;|EXEC SQL]]''actions of the Rule Language. The standard query that uses the FIND action should be suitable for most needs. However, some complex queries may require raw SQL. In this case a query can refer to a stored procedure or include a block of raw SQL that uses the SELECT SQL statement. When configurators create a new query, they specify whether they want a standard query that uses the FIND action, a stored procedure or an SQL SELECT statement. 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. +There are three types of queries as far as search criteria is concerned: 
 +  - Those that use search criteria compatible with the ''[[a_f:a:find|FIND]]'' action (we will be calling them "standard queries"
 +  Queries that use stored prcedures and map to the ''[[a_f:a:exec_sp|EXEC SP]]'' action 
 +  - Queries that use the SQL SELECT statement and map to the ''[[a_f:a:exec_sql;|EXEC SQL]]''action.  
 +   
 +Standard queries should be suitable for most needs. However, some complex queries may require stored procedures or raw SQL. When configurators create a new query, they specify whether they want a standard query a stored procedure or an SQL SELECT statement.  
 +   
 +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:0200_basics:0600_business_object_groups|business object group]]) the instances of which the query will be searching. For standard queries the configurator has to either select the business object or group explicitly (if working in the Query Builder View) or provide it as part of the FIND action (if working with the Query Text View). For queries implemented as stored procedure the user has to specify the RETURN statement followed by the name of the business object or group. For queries implemented as an SQL SELECT statement, the name of the business object can be derived from the name of the table in the SELECT statement of the SQL. When defining a query, the configurator has to indicate the business object, (or [[docs:2000_concepts:0200_basics:0600_business_object_groups|business object group]]) the instances of which the query will be searching. For standard queries the configurator has to either select the business object or group explicitly (if working in the Query Builder View) or provide it as part of the FIND action (if working with the Query Text View). For queries implemented as stored procedure the user has to specify the RETURN statement followed by the name of the business object or group. For queries implemented as an SQL SELECT statement, the name of the business object can be derived from the name of the table in the SELECT statement of the SQL.