mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.49k stars 299 forks source link

Intellisense fetches information about all databases in the cluster to show in autocomplete #1065

Open rcaetanomeli opened 1 year ago

rcaetanomeli commented 1 year ago

Describe the bug When I have more than one database in the same cluster/connection, the intellisense fetch all table names, columns, etc, of all databases, instead of only the one configured in the connection.

This is particulary not so good when I have multiple databases with the same structure (test and stage versions of the same database for example). In this case all table/column names get duplicated in the auto complete dropdown.

Expected behavior If this is a feature, so we can use other databases in the same connection without having to create different connections, it would be good to remove the duplicates from the list.

Desktop (please complete the following information):

Noctumsempra commented 1 year ago

Hello, guys.

I'm on vscode, using SQLTools + MySQL/MariaDB driver. I'm having an issue with AUTOCOMPLETE MENU, it not only shows info from more than one database than corresponding (I'm on DB "gofriz_mii" and also fetches from "gofriz_mii2" is it internally fetching info matching regexes instead of exact DB names?

It's confusing. Shows info from more than one table (regex match suspect on table name) and duplicated in the menu (2 servers setup, with those 2 DB each).

image

image

image

So, sometimes i get DOUBLE info (cause both DB names start with "gofriz_mii" and somehow grabs info from both) and sometimes 4 times like in the first screen. I hope this helps.

fulf commented 7 months ago

+1 here.

I have tons of databases on the local MySQL server. I'd love for the SQLTools connection to get scoped only to the database inputted in the Database field.

This should include both SQL autocomplete, as well as when opening the connection in the explorer on the left.

Felipe-53 commented 3 months ago

+1, yup that is really annoying. Plus, in my case, it does not list all the options, meaning I do not have autocomplete for all the tables in the db.