The Query Object allows you to make queries to the database in terms of attributes; you indicate the necessary data and the filters to apply and GeneXus will handle the database navigation to retrieve the required information.
The Query Object now has a new User Control called Query Viewer, which makes it possible to add a previously defined query in a Web Panel in order to view it. To do so, just select the Query Viewer from the list of User Controls and drop it on the desired area of the Web Panel.
The query to be displayed can be assigned at design time (using the properties dialog of the control) or at runtime (using GeneXus code).
With the Query Object we want to give the GeneXus developer an intuitive, simple way to program queries in his or her application.
Four items that characterize the definition of queries:
1. Attributes that I will retrieve, indicating the aggregations to use.
2. Filters that I will apply (comparison operators, list of values, subquery).
3. If the query has parameters, indicate those parameters and their type.
4. Order in which results are displayed.
In addition, there is a tab called "SQL Statement" that allows us to view the SQL sentence associated with the query.
Lastly, the "Preview" tab allows us to indicate how we want the query to be displayed on screen. The possible outputs are Table, Pivot Table and Chart. To achieve this functionality, a new control with Flash technology is being used to offer a much richer user experience.
Support is provided for all the DBMS that GeneXus works with and the Query object can now be used in C# and Java applications (up to now only C# was supported). The most popular browsers are also supported.