Join autocomplete order & table aliases


I know this might sound a bit silly but I like my joins to be like this:

> join table_a a on = b.table_a_id

But datagrip autocompletes them like this:

> join table_a a on b.table_a_id =

Is there a way to change the order?


Also, is it possible to add custom aliases to tables when using the autocomplete?

Let's say I have the table cellphones, I would like that the autocomplete always used cell as an alias, instead, sometimes I get c or c2.




Comment actions Permalink

Be attentive to our release notes :)

There is a setting:


Custom aliases are also here, and it's described at the same NEWS page as well!

Comment actions Permalink

Awesome, thanks for the answer!

Will begin reading them :)

Comment actions Permalink


This is a great function I was looking for, however I'd like an advanced option to auto-generate aliases based on pattern. In my team, we have a code rule for table name pattern, which is : table_name_<unique_trigram>. In the above cellphone example, it would be something like cellphones_cel. Would it be possible to allow to define auto-generated aliases based on such patterns?

In Code Generation settings, we can define pattern for key/index generation, it would be awesome to be able to define alias pattern in a similar way to avoid declaring every 400+ tables we have in the project.



Comment actions Permalink

So, cellphones_cel is the name of the table itself? Or is it the alias you wish to see? I don't  fully understand the case.


Please sign in to leave a comment.