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 a.id = b.table_a_id
But datagrip autocompletes them like this:
> join table_a a on b.table_a_id = 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.
Thanks,
Fran
请先登录再写评论。
Be attentive to our release notes :) https://www.jetbrains.com/datagrip/whatsnew/#code-completion
There is a setting:
Custom aliases are also here, and it's described at the same NEWS page as well!
Awesome, thanks for the answer!
Will begin reading them :)
Hello,
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.
Thanks,
Stéphane
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.