Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361828

Summary: CNTL-1 has "no suggestions available" for SQL open rs from ds for row.
Product: z_Archived Reporter: Paul Hoffman <hoffmanp>
Component: EDTAssignee: Zhi Zhu <zhuzhi>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: chenzhh, jvincens
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
library for loading database for test program none

Description Paul Hoffman CLA 2011-10-24 12:20:50 EDT
CNTL-1 for get row from ds shows default select statement used for the get.

CNTL-1 for open rs from ds for row should show the default select statement used for the open.

To see problem, open test case program, position cursor after "open" and press CNTL-1.
Comment 1 Paul Hoffman CLA 2011-10-24 12:21:16 EDT
Created attachment 205845 [details]
library for loading database for test program
Comment 2 Zhi Zhu CLA 2011-10-25 21:01:12 EDT
Paul, do not see any get or open statement in your attachment.

Do you mean:
  myCustomer Customer;
  connUrl string = “jdbc:derby:SomeDB;create=true;”;
  ds SQLDataSource = new SQLDataSource(connUrl);

  get myCustomer from ds;

  should generate sql like this:
    get myCustomer from ds using(myCustomer.id) with #sql{
	SELECT *
	FROM CUSTOMER
	WHERE id = ?
   };

  This works based on your comment

  For open statement:
   rs SQLResultSet;
   open rs from ds;

   Should we get sql like this:

    open rs from ds with #sql{
	SELECT * 
        FROM CUSTOMER
    };

   if you want default sql for statement: open rs from ds;

    Here is the question, where do I get table schema?
Comment 3 Zhi Zhu CLA 2011-10-25 22:41:01 EDT
Paul, are you referring to this open statement:

  open rs from ds for row ;

Where I can get table message from 'row'?
Comment 4 Zhi Zhu CLA 2011-10-26 20:41:18 EDT
please refer to bug 362139
Comment 5 Zhi Zhu CLA 2011-10-26 20:58:14 EDT
EGLSQLClauseFactory.java
SQLIOStatementUtility.java
AbstractSQLStatementProposal.java
SQLAssistantSubProcessor.java
Comment 6 Paul Hoffman CLA 2011-11-02 10:41:28 EDT
Verified and closed