[hg] main-silver: #200368: CC doesn't work when specifying an al...

  • From: Jaroslav Havlin < >
  • To:
  • Subject: [hg] main-silver: #200368: CC doesn't work when specifying an al...
  • Date: Tue, 02 Jul 2013 11:55:07 -0700

changeset 91ff947f40d9 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/91ff947f40d9
description:
        #200368: CC doesn't work when specifying an alternate DB

        Patch by Matthias42.

diffstat:

 
db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionQuery.java
                  |  2 +-
 
db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/SelectCompletionQueryTest.java
 |  4 ++++
 
db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectTripleQualColumn.pass
    |  4 ++--
 
db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectTripleQualColumn.test
    |  2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)

diffs (48 lines):

diff --git 
a/db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionQuery.java
 
b/db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionQuery.java
--- 
a/db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionQuery.java
+++ 
b/db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionQuery.java
@@ -441,7 +441,7 @@
     private void completeTuple(Identifier ident) {
         if (ident.fullyTypedIdent.isEmpty()) {
             completeTupleSimpleIdent(ident.lastPrefix, ident.quoted);
-        } else if (ident.fullyTypedIdent.isSimple()) {
+        } else {
             completeTupleQualIdent(ident.fullyTypedIdent, ident.lastPrefix, 
ident.quoted);
         }
     }
diff --git 
a/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/SelectCompletionQueryTest.java
 
b/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/SelectCompletionQueryTest.java
--- 
a/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/SelectCompletionQueryTest.java
+++ 
b/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/SelectCompletionQueryTest.java
@@ -137,6 +137,10 @@
         suite.addTest(new SelectCompletionQueryTest("selectAfterDeclare"));
         suite.addTest(new SelectCompletionQueryTest("selectAfterSet"));
 
+        // #200368: CC does not work with fully qualified names (catalog, 
schema)
+        //          table names are not completed
+        suite.addTest(new 
SelectCompletionQueryTest("selectQualifiedIdentifierFrom"));
+
         return suite;
     }
 
diff --git 
a/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectTripleQualColumn.pass
 
b/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectQualifiedIdentifierFrom.pass
copy from 
db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectTripleQualColumn.pass
copy to 
db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectQualifiedIdentifierFrom.pass
--- 
a/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectTripleQualColumn.pass
+++ 
b/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectQualifiedIdentifierFrom.pass
@@ -1,2 +1,2 @@
-Column invoice_id in table acatalog.accounting.invoice
-Column customer_id in table acatalog.accounting.invoice
+Table customer
+Table invoice
\ No newline at end of file
diff --git 
a/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectTripleQualColumn.test
 
b/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectQualifiedIdentifierFrom.test
copy from 
db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectTripleQualColumn.test
copy to 
db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectQualifiedIdentifierFrom.test
--- 
a/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectTripleQualColumn.test
+++ 
b/db.sql.editor/test/unit/src/org/netbeans/modules/db/sql/editor/completion/selectQualifiedIdentifierFrom.test
@@ -1,4 +1,4 @@
-select acatalog.accounting.invoice.|
+select * from acatalog.accounting.|
 
 --
 <unknown>

[hg] main-silver: #200368: CC doesn't work when specifying an al...

Jaroslav Havlin 07/02/2013

Project Features

About this Project

DB was started in November 2009, is owned by Antonin Nebuzelsky, and has 113 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close