vscode-sqltools
vscode-sqltools copied to clipboard
Improve autocomplete
Is your feature request related to a problem? Please describe.
Autocomplete is currently a but limited. For example, the second column in select a, b from c
does not receive suggestions. Cases like with foo as (select * from bar) select * from baz
the with clause column will receive suggestions from the baz table.
Describe the solution you'd like Replacing node-sql-parser with gethue parsing library provides a better parsing context, as it correctly identifies where the cursor currently is, what suggestion types can be included (databases, tables, columns, keywords, functions), and identifies the right context (database for the tables, table(s) for the columns, ...)
Describe alternatives you've considered I looked at other libraries, none providing the same level of insight into the query.
I too would love to see autocomplete working for column names.
It's currently partially working for the first column of a select statement - it suggests columns from all tables, rather than columns from tables in the FROM
clause of the statement only.
Unfortunately for all subsequent columns in the SELECT
statement there is not even the behaviour described above.
This is a great extension, just a couple of little things to polish off and it'd be really excellent!