| [news.eclipse.dtp] Re: Filtering Tables in SQLBuilder Dialog Example |
Hi Brian,
org.eclipse.datatools.sqltools.parsers.sql.query.vendorExtension
Thanks Philippe
If you're looking at going at this from the JPA side of things, the JPA tooling in WTP uses DTP. :)
You might pose your question on the eclipse.technology.dali newsgroup (which is very active) to ask about JPA.
As for the SQL Editor/SQL Query Builder questions, I've asked one of the guys working on the SQL Query Builder to chime in here, so hopefully he'll have a chance to do so today.
It certainly sounds like an interesting project. :)
--Fitz
"Philippe Weber" <philippeweber57@xxxxxxxx> wrote in message news:gc4u04$sap$1@xxxxxxxxxxxxxxxxxxxxHi Brian,
To illustrate my usecase,
I'm involved in prototyping the migration of a rather old app that used flat file data support to a a database support. The prototype is now based on Eclipse RCP.
The application use the terms of dataset and dataset description
So one file was used to describe dataset structure + pointer to file(s) containing the real data for a dataset.
Then SQL-like query will be run on datasets data (Join , Order by...)
In the new application general dataset structure type edition will be available using JPA and stored in database (not my part of the job). And a dataset will reference the correct structure type.
Then the creation of standard SQL query on dataset reading their structure should be made using GUI similar to SQL Query Builder.
So I though of finding how to plug into the SQL Builder with my custom model.
Thanks to the article on your blog, I understood the structure of an enablement project, and starting with a copy of mysql enablement projects and changing to custom name from Vendor up to Connection Profile, I created my custom "ExtendedMySQL" driver to be able to manage the DB catalog as I want.
For testing I simply changed the code in loadTables() and loadColumns() method to push up static data to SQL Builder
(As I started from MySQL I'm not using overrideLoader in org.eclipse.datatools.connectivity.sqm.core.Catalog extension point but directly catalog)
From there I'm waiting for a decision of the architect on the project to know if I should use JDBC connection and then create similar project for each DB we should support (Oracle and Postgres), or generalize this project to be only a facade to call JPA DAO that could be shared with other part of the project (not yet created).
Sorry it's a little early for me to provide an example. But if I found out interesting use of DTP SQL Tools from my investigation, I'll gladly share it with the newsgroup.
Generally I would like to know if there is work in progress for Navigating a JPA "Repository". Because I'm more interested in being able to visualize my business object than fetching Database.
Also I think that it could be helpful to create complex JPQL query.
From how I understand it, having the same for JPA "Repository" as what was done for Databases would need hard work on a "JPA Modelbase" project, right ?
Also is there some reference on how SQLtools make use of Ecore models for DBdefinitions to satisfy my curiosity.
Thanks, Philippe
Brian Fitzpatrick wrote:I'd also be interested in getting some information about what kind of structure information you're reading from specific tables. Is this particular to your database? If so, could you come up with a generic example that I could use to play with?
--Fitz
"Philippe Weber" <philippeweber57@xxxxxxxx> wrote in message news:gbsmoo$tk5$1@xxxxxxxxxxxxxxxxxxxxI report some of my testing hoping to get help on the go.
I would like to use the SQL Builder as it is to create SQL-like query, however the database structure is not what I want to query against (in fact I need to read structure description from specific tables so I though executing Select statement to replace connection.getMetatData calls).
So I though of creating a custom connection profile to override catalog loading.
For testing I started with MySQL so,
I tried to copy and change catalog code in datatools.enablement.mysql plugins
and also to use a brand new plugin with profileExtension and overrideLoader extension point property set.
But it seems that my code for catalog loading is totally ignored by Data Source Explorer and SQL Builder.
Could someone points me to a good start with extending existing connectionProfile.
Thanks Philippe
Philippe Weber wrote:Hi DTP newsgroup,
I checked out from CVS the SQL Builder Dialog Example project org.eclipse.datatools.sqltools.sqlbuilder.examples
I found it very promising but to fit my needs I should be able to filter out the tables available for building the query.
I don't know if this could be done at the level of the SQLDomainModel object used by the dialog or if I should extends ODA JDBC driver to add specific filtering.
Does anyone have already tried this or could give me a clue ?
Thanks Philippe