I've recently upgraded to version 3.0.0 from an earlier version of SQLExplorer. I'm having difficulty getting the SQL completion to work in this new version. It does not completion on SQL keywords like 'update' and 'where'. However, it isn't doing completion on my table and column names. On the previous version that I had installed, this worked just fine, so I'm not sure what is the matter.
I do have the 'Tables and columns auto-completing assistance...' checkbox selected in the Preferences.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had a typo in my last post. The sentence "It does not completion on SQL keywords..." should be corrected to "It does do completion on SQL keywords..."
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I got the completion working. I had to make a couple of modifications to the Dictionary class. Can someone please examine this change to see whether it would be appropriate to have it committed to CVS?
First, I had to add a couple of entries to SUPPORTED_CONTENT_ASSIST_TYPES. On my database, Oracle 9.2/ojdbc14.jar, the table nodes were coming back with a type name of "TABLE_FOLDER" instead of "TABLE_TYPE”; the same thing was true of views. Hence, I modified line 42 of Dictionary.java as such:
private static final String[] SUPPORTED_CONTENT_ASSIST_TYPES = new String[] {"TABLE_FOLDER", "TABLE_TYPE", "VIEW_FOLDER", "VIEW_TYPE"};
I also had to modify line 117 of Dictionary.java so that the column lists were put into the col_map using the lowercase table name. Without that, I was getting a null on line 213 of SQLCompletionProcessor.
Here is my modified line 117 of Dictionary.java
col_map.put(key.toLowerCase(), value);
Does this change make sense? If so, can it be committed to CVS?
Thanks,
Frank
P.S. Here is a diff -u of my changes:
--- Dictionary.java 2006-09-19 10:56:02.607897600 -0500
+++ Dictionary.java.HEAD 2006-08-24 20:25:08.000000000 -0500
@@ -39,7 +39,7 @@
public class Dictionary {
// TODO check if we need to add more types or remove restriction completely?
- private static final String[] SUPPORTED_CONTENT_ASSIST_TYPES = new String[] {"TABLE_FOLDER", "TABLE_TYPE", "VIEW_FOLDER", "VIEW_TYPE"};
+ private static final String[] SUPPORTED_CONTENT_ASSIST_TYPES = new String[] {"TABLE_TYPE", "VIEW_TYPE"};
private static final Log _logger = LogFactory.getLog(Dictionary.class);
@@ -114,7 +114,7 @@
public void putColumnsByTableName(String key, Object value) {
I already added the fix to cvs, but when I was checking against a DB2 database some errors occurred.
All system tables are loaded as well, is this supposed to happen or should there be a restriction?
Wouter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've recently upgraded to version 3.0.0 from an earlier version of SQLExplorer. I'm having difficulty getting the SQL completion to work in this new version. It does not completion on SQL keywords like 'update' and 'where'. However, it isn't doing completion on my table and column names. On the previous version that I had installed, this worked just fine, so I'm not sure what is the matter.
I do have the 'Tables and columns auto-completing assistance...' checkbox selected in the Preferences.
I had a typo in my last post. The sentence "It does not completion on SQL keywords..." should be corrected to "It does do completion on SQL keywords..."
I got the completion working. I had to make a couple of modifications to the Dictionary class. Can someone please examine this change to see whether it would be appropriate to have it committed to CVS?
First, I had to add a couple of entries to SUPPORTED_CONTENT_ASSIST_TYPES. On my database, Oracle 9.2/ojdbc14.jar, the table nodes were coming back with a type name of "TABLE_FOLDER" instead of "TABLE_TYPE”; the same thing was true of views. Hence, I modified line 42 of Dictionary.java as such:
private static final String[] SUPPORTED_CONTENT_ASSIST_TYPES = new String[] {"TABLE_FOLDER", "TABLE_TYPE", "VIEW_FOLDER", "VIEW_TYPE"};
I also had to modify line 117 of Dictionary.java so that the column lists were put into the col_map using the lowercase table name. Without that, I was getting a null on line 213 of SQLCompletionProcessor.
Here is my modified line 117 of Dictionary.java
col_map.put(key.toLowerCase(), value);
Does this change make sense? If so, can it be committed to CVS?
Thanks,
Frank
P.S. Here is a diff -u of my changes:
--- Dictionary.java 2006-09-19 10:56:02.607897600 -0500
+++ Dictionary.java.HEAD 2006-08-24 20:25:08.000000000 -0500
@@ -39,7 +39,7 @@
public class Dictionary {
// TODO check if we need to add more types or remove restriction completely?
- private static final String[] SUPPORTED_CONTENT_ASSIST_TYPES = new String[] {"TABLE_FOLDER", "TABLE_TYPE", "VIEW_FOLDER", "VIEW_TYPE"};
+ private static final String[] SUPPORTED_CONTENT_ASSIST_TYPES = new String[] {"TABLE_TYPE", "VIEW_TYPE"};
private static final Log _logger = LogFactory.getLog(Dictionary.class);
@@ -114,7 +114,7 @@
public void putColumnsByTableName(String key, Object value) {
- col_map.put(key.toLowerCase(), value);
+ col_map.put(key, value);
}
Thanks Frank!!! I'll add your fix to cvs.
Davy
Looks like Wouter beat me to it :-)
Code was already in cvs.
D.
Hi Frank, Davy,
I already added the fix to cvs, but when I was checking against a DB2 database some errors occurred.
All system tables are loaded as well, is this supposed to happen or should there be a restriction?
Wouter