-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#428 auto complete list #3980
#428 auto complete list #3980
Conversation
@@ -78,12 +78,18 @@ public boolean autoComplete(Sentence sentence) { | |||
DbSchema bestSchema = null; | |||
for (DbSchema schema: schemas) { | |||
String name = StringUtils.toUpperEnglish(schema.name); | |||
String quotedName = "\"" + schema.quotedName + "\""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
schema.quotedName
can be either quoted or unquoted, you shouldn't try to quote it again.
It is actually a normalized name (how it should be inserted into SQL), so you can rename this field and introduce a new one with a real always quoted name (constructed with StringUtils.quoteIdentifier()
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for feedback and advice.
I have fixed that and also added tests accordingly for identifiers like "quoted schema"
and "quoted tablename"
.
I think these historic conversions to upper case don't look right, especially for some Unicode characters. |
Agreed, I just wanted to avoid changing too much. |
…o #428AutoCompleteList
… `StringUtils.startsWithIgnoringCase()`
Remove all |
Totally unrelated, please allow me to ask: why are those test cases implemented in a special way but not using regular Junit5? Of course it does not matter in general although I experiences some disadvantages:
No need to rock the boat, just want to understand the rational behind. |
|
I have fixed the String Comparison and am using PS: please why do the Unit Tests fail? I don't think this was related to my PR. |
Team, any objections on merging this? |
Thanks a lot! |
Fixes issues with the Auto Completion when quotes schemas or table names are involved.
Added some more test cases for quoted schemas and quoted table names.
I have not been able to fix the Web Client inserting the selection into the SQL (which is broken for quoted items).
Partially fixes #428