View source | View content page | Page history | Printable version   

Projects:HQL Query Tool Distribution Inclusion/Specs

Contents

Introduction

HQL Query Tool is an external Openbravo module that allows to execute HQL queries. It is targeted to Openbravo developers enabling them to test queries when developing new functionalities.

It has been proved to be a useful tool and, because of it, it has been decided it makes sense to be included as part of the Openbravo 3 distribution.

Current Status

HQL Query Tool was initially published in 2009 as a 2.50 module. Since then there has been few maintenance. It is still implemented using 2.50 technology.


HQL Query Tool 1.0.8.png

Features:

Requirements to be included in Openbravo 3 distribution

Must have

Reimplement with Openbravo 3 technology

Additional components implemented with 2.50 technology should not be included in Openbravo 3 distribution. Therefore, HQL Query Tool must be reimplemented using Openbravo 3 technology: View Implementation based on SmartClient.

Preserve current functionality

At least, existing functionality must be preserved or improved.

Nice to have

In addition, some improvements on existing functionalities and new utilities could be included.

Query result visualization

Keyboard shortcut to execute query

Currently Execute button must be clicked using the mouse. It would be useful to define a shortcut so query can be launched after typing without need of using the mouse.

Partial query execution

Currently the whole text is used as query, in case of writing several queries it requires to delete previous one before executing the following one.

Having part of the text selected, only this part should be considered as the query to execute (similar behavior as ie. pgAdmin).

Improved properties visualization

Show actual SQL

HQL queries are parsed and executed as SQL in database. In order to make optimizations in HQL queries, it would be very useful to know the SQL that is actually executed.

Keep query history

It would be useful to keep a history of executed queries, so they can be reused in other sessions.

Easier to find errors

When a query cannot be executed, currently the whole stack trace of the error is displayed (see image).

HQL Query Tool Error.png

As part of this stack it usually points to the position it occurred:

 org.postgresql.util.PSQLException: ERROR: syntax error at or near "column"
 Position: 2845

It would be useful to, at least, have an easy way to navigate to that position.

Kill execution of a query

When a query takes too long this may kill server so it would be nice to have an option to kill execution of the query.

Dialogue requesting parameters

When a query points to named parameters these could be requested to the user when executing the query.

SQL execution

Allow to select language to execute the query (SQL/HQL). In this way it would also be a replacement for current SQL Query window which is already in distribution and implemented with 2.50 technology.

HQL completion

It would be useful to have an assistant to complete queries which would propose valid HQL code while typing. Such as pgAdmin does.

PgAdmin query completion.png

Syntax highlight

It would be nice if reserved HQL words would be highlighted with a different color/style from the rest of the words in the query.

UX design

TBD

Retrieved from "http://wiki.openbravo.com/wiki/Projects:HQL_Query_Tool_Distribution_Inclusion/Specs"

This page has been accessed 2,452 times. This page was last modified on 2 November 2015, at 08:17. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.