Autosuggest - Query context /

ghoppermaster's profile image ghoppermaster posted 1 year ago in Feature discussion Permalink

Hi again,

In regards to autosuggest, when writing a query such as:

'select * from MyTable1 where '

or a join from multiple tables:

'select * from MyTable1 inner join MyTable2 on MyTable1.id = MyTable2.foreign_id where '.

At this point, I often want autosuggest to show me a list of columns from the tables in the query.

But the autosuggest (understandably) can't be sure what you're wanting exactly, so it shows all options.

I wonder if it would be possible to have a different trigger such as [Ctrl + Double Space] that filters the autosuggest options to just the columns from tables in the current query?

Or perhaps the autosuggest opens with [Ctrl+space] but has tabs on it (or a first level menu) that shows current context, all objects and functions? Easily navigate the tabs / menu by using the right and left arrow keys, then select the option you want?

I understand that using an alias (or the full table name) in the query will allow the autosuggest to work within context. If alias is required for contextual autosuggest, then I wonder if it's possible to have an option to automatically alias tables (that are inserted from autosuggest themselves)?

For instance:

  1. Type 'select * from My'
  2. Press CTRL+Space for autosuggest
  3. Select * from 'MyTable' from the list
  4. Autosuggest automatically aliases the table
  5. Query is now select * from MyTable myt
  6. Continue writing the where clause: 'select * from MyTable myt. [Ctrl + Space], column names appear.

The auto-alias feature could be set in preferences. I only know english, so not sure how this would affect other languages. But for example a formula choice could be 'Remove all vowels, select first 3 letters' etc.

Once again, thanks for a great product and allowing us to provide feedback.

Regards,

John

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