Hello Brian Payton,
Thank you for your answer. I’ll take
a look at the SQLQueryParserInteractiveTest first.
Basically, I want to create a SQL Query
model based on a given query text and then manipulate that model. For example,
given a query text like “SELECT * FROM t1 WHERE a1 = 5;”, I need
build a model to represent this query and modify each clause in this query (e.g.
add/delete/modify the predicates in WHERE clause), then output the changed
query text.
Thanks and Best Regards!
Alex Liu
SQL Lab,
China
Teradata
R&D China
Tel: +86-10-5874 1753
From:
dtp-models-dev-bounces@xxxxxxxxxxx [mailto:dtp-models-dev-bounces@xxxxxxxxxxx] On Behalf Of Brian Payton
Sent: Tuesday, March 15, 2011 9:20
AM
To: DTP Model Base project
development list
Subject: Re: [dtp-models-dev] SQL
query model in ModelBase
Hello Alex,
The
SQL model and SQL Query model are both based on EMF, so they provide a
comprehensive API that can be used from both UI-driven and non-UI-driven
applications.
If
you are creating a SQL Query model incrementally, then take a look at the "xxxHelper"
classes in both the org.eclipse.datatools.modelbase.sql.query plugin and in the
org.eclipse.datatools.sqltools.sqlbuilder plugin ("model" package).
If
you are creating a SQL Query model by parser SQL source, then take a look at
the SQLQueryParserInteractiveTest class in the test plugin
org.eclipse.datatools.sqltools.parsers.sql.query.test. The test plugin is
available the DTP CVS repository:
Host: dev.eclipse.org
Repository path: /cvsroot/datatools
Module: org.eclipse.datatools.sqltools/plugins/org.eclipse.datatools.sqltools.parsers.sql.query.test
Connection type: pserver
User: anonymous
Brian Payton
DTP
PMC Lead
Data Tools Development
IBM Silicon Valley Laboratory
From: "Liu, Alex" <Alex.Liu@xxxxxxxxxxxx>
To: <dtp-models-dev@xxxxxxxxxxx>
Date: 03/09/2011
08:55 PM
Subject: [dtp-models-dev]
SQL query model in ModelBase
Sent by: dtp-models-dev-bounces@xxxxxxxxxxx
Hi all,
I am writing to consult one tihing about the model base project in DTP. Does
ModelBase (or other module) provide public APIs for a non-UI driven application
to build a SQL query model?
My
expected behavior is:
1) build a specified SQL query model
2) manipulate the model
3) transform the model to a SQL text string.
Does
ModelBase support this?
Thanks
and Best Regards!
Alex LIU
SQL Lab, China
Teradata R&D China
Tel: +86-10 5874 1753 _______________________________________________
dtp-models-dev mailing list
dtp-models-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-models-dev