Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » SQL Completion in DTP 1.6RC1
SQL Completion in DTP 1.6RC1 [message #44798] Mon, 26 May 2008 19:39 Go to next message
Eclipse UserFriend
Originally posted by: sschaub.NOSPAM.gmail.com

Eclipse 3.3.2 on XP SP2 with DTP 1.6.0 RC1 and DB2 8.1

I am having some limited success with SQL completion in the SQL editor.
However, I am hoping for more, and wondering if the tool is functioning as
designed.

In the following query:

SELECT *
FROM AA.BBBB

... when I type this much

SELECT *
FROM AA.^

(^ indicates cursor location) I get a list of table names in the AA
schema. That's nice. However, if I just type

SELECT *
FROM ^

and request completion, I don't get a list of schema names or tables. Is
there a way to request a list of schema names? Even better, I would like
to see a list of tables in the current schema. But I don't see a way to
set a current schema for the editor.

Regarding column completion, when I type the following:

SELECT AA.BBBB.^
FROM AA.BBBB

and press Ctrl+Space at the ^ I get a list of column names in table BBBB.
However, when I request completion at the following location:

SELECT ^
FROM AA.BBBB

I get nothing. I would expect to see a list of columns from the tables in
the FROM clause - ?

By the way, I love the simplified connection profile creation in 1.6. A
vast improvement over earlier versions.
Re: SQL Completion in DTP 1.6RC1 [message #44988 is a reply to message #44798] Thu, 05 June 2008 21:17 Go to previous message
Eclipse UserFriend
Originally posted by: sschaub.nowhere.net

Stephen Schaub wrote:

I spent some time browsing the source code and think I found some answers
to my own questions. I've documented what I think; corrections are welcome.

> Eclipse 3.3.2 on XP SP2 with DTP 1.6.0 RC1 and DB2 8.1

> I am having some limited success with SQL completion in the SQL editor.
> However, I am hoping for more, and wondering if the tool is functioning as
> designed.

> ... when I type this much

> SELECT *
> FROM AA.^

> (^ indicates cursor location) I get a list of table names in the AA
> schema. That's nice. However, if I just type

> SELECT *
> FROM ^

> and request completion, I don't get a list of schema names or tables.

In this scenario, the current DTP code tries to find a list of tables in a
default schema. The default schema is the schema whose name matches the
database connection login name. Since in my case there were no tables in
the default schema, nothing appeared.

> I don't see a way to
> set a current schema for the editor.

I don't think there's a way to do this. I plan to check to see if there's
a feature request for this.

> Regarding column completion, when I type the following:

> SELECT AA.BBBB.^
> FROM AA.BBBB

> and press Ctrl+Space at the ^ I get a list of column names in table BBBB.
> However, when I request completion at the following location:

> SELECT ^
> FROM AA.BBBB

> I get nothing.

It appears that the code completion engine does not take into account the
entire query when computing proposals. It attempts to parse the query to
the point where the cursor is located, and does not consider the remainder
of the statement. It's not designed to present a list of column names in
this scenario, and I don't think it can handle table aliases, either. Too
bad...
Re: SQL Completion in DTP 1.6RC1 [message #591295 is a reply to message #44798] Thu, 05 June 2008 21:17 Go to previous message
Stephen Schaub is currently offline Stephen SchaubFriend
Messages: 13
Registered: July 2009
Junior Member
Stephen Schaub wrote:

I spent some time browsing the source code and think I found some answers
to my own questions. I've documented what I think; corrections are welcome.

> Eclipse 3.3.2 on XP SP2 with DTP 1.6.0 RC1 and DB2 8.1

> I am having some limited success with SQL completion in the SQL editor.
> However, I am hoping for more, and wondering if the tool is functioning as
> designed.

> ... when I type this much

> SELECT *
> FROM AA.^

> (^ indicates cursor location) I get a list of table names in the AA
> schema. That's nice. However, if I just type

> SELECT *
> FROM ^

> and request completion, I don't get a list of schema names or tables.

In this scenario, the current DTP code tries to find a list of tables in a
default schema. The default schema is the schema whose name matches the
database connection login name. Since in my case there were no tables in
the default schema, nothing appeared.

> I don't see a way to
> set a current schema for the editor.

I don't think there's a way to do this. I plan to check to see if there's
a feature request for this.

> Regarding column completion, when I type the following:

> SELECT AA.BBBB.^
> FROM AA.BBBB

> and press Ctrl+Space at the ^ I get a list of column names in table BBBB.
> However, when I request completion at the following location:

> SELECT ^
> FROM AA.BBBB

> I get nothing.

It appears that the code completion engine does not take into account the
entire query when computing proposals. It attempts to parse the query to
the point where the cursor is located, and does not consider the remainder
of the statement. It's not designed to present a list of column names in
this scenario, and I don't think it can handle table aliases, either. Too
bad...
Previous Topic:Oracle
Next Topic:ecore ODA - dependencies for driver?
Goto Forum:
  


Current Time: Fri Mar 29 07:08:19 GMT 2024

Powered by FUDForum. Page generated in 0.03430 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top