Produce smarter autocomplete (especially involving backticks)(mysql)

Arffeh's profile image Arffeh posted 9 years ago in Feature discussion Permalink
Some examples:

Case 1:
-----------
Query:
SELECT * FROM `<ctrl+space>

Expect:
Dropdown of tables

Result:
A blank dropdown
-----------


Case 2:
-----------
Query:
SELECT * FROM <ctrl+space>

Expect:
Dropdown of tables

Result:
Dropdown of tables
-----------


Case 3:
-----------
Query:
SELECT <ctrl+space> FROM `table` WHERE ...
SELECT <ctrl+space> FROM table WHERE ...

Expect:
Dropdown of columns from table

Result:
Dropdown of everything _except_ columns from the table. :)
-----------


So case 1, it freaks out on backticks.
Case 2 seems fine, but...
Case 3 is the result of autocomplete being a bit "dumb", for lack of a better word.

In case three, the table (and therefore the structure) is 100% understood, and autocomplete has been called between "SELECT" and "FROM". Given those conditions, it would be a reasonable assumption that the user wishes to know the available columns to use.

This is a really long-winded way of saying that if autocomplete were a little more clever, I'd probably use the feature. Whenever I think about trying it, it's very off-putting spending time on it to figure out what I need isn't actually an option at all.

That, and I use backticks. LOTS OF BACKTICKS. :)
Arffeh's profile image Arffeh posted 9 years ago Permalink
Nothing?

Please login to leave a reply, or register at first.