sasha-alias / sqltabs

Rich SQL client for Postgresql, MySQL, MS SQL, Amazon Redshift, Google Firebase (Firestore)
https://www.sqltabs.com
GNU General Public License v3.0
803 stars 57 forks source link

Better autocompletation #98

Open maury91 opened 7 years ago

maury91 commented 7 years ago

I was thinking a way to reduce the noise on the autocomplete. Analyse the query to understand which tables are being used is probably too difficult. But there's an easy workaround

SELECT
  table_name.<auto complete here with the columns of the table>
FROM
  public.<auto complete here with the tables/functions in public>

(I can implement this feature, I've already spotted the interested areas)

sasha-alias commented 7 years ago

interesting idea, I actually think it shouldn't be too smart in order to not accidentally limit the things. I'd go first with filling the mapping object_name -> properties without distinguishing the type of object. I.e. if there is schema public and table public then the mapping would contain properties for both schema and table. Having the above will allow "smart" autocompletion after pressing the dot. I really appreciate if you implement this. I'm not planning to work on this in the nearest future for sure.. (still working on explain plan visualisation)