[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.dtp] extending SQL Builder

Hello,

We are trying extending the SQL Builder dialog of the SQL data tools for providing our project specific functionality.

Our requirements are

1. To have the SQLBuilder and Parser detect our own host variable
     a. The syntax for our host variable is %var%.
e.g. %id% is the host variable in the following select query:  Select cust_id, cust_name from customer where cust_id = %id%

2.	To extend the SQLBuilder GUI for supporting host variable with new syntax.
a.	One view is an additional option where we find P_BUILD_Expression(Build Expression...)
b.	OR a custom page in 'Expression Builder' wizard.

The following are the problems we faced while trying to tailor SQL data tools code for our needs

About the host variable parsing/recognition: SQLQuerySourceFormat class only provides a way to set the host variable prefix character. But in our scenario, the variable is delimited by a prefix and a suffix, i.e. '%'. The SQLQueryParserFactory's createVariableExpression() method also handles only the prefix.

About extending the SQL Builder GUI: most classes have the fields declared in default (package level) scope
a. Is there a provision to add something like P_INPUT_EXPRESSION where it presently shows P_BUILD_EXPRESSION/ P_EDIT_EXPRESSION/ P_REPLACE_EXPRESSION for launching our own expression builder b. OR is there a way to contribute a new page to the 'Expression Builder wizard' e.g. through some sort of extension?


Thanks for your help in advance.