Allow queries to have columns all on the same line or on different lines
已回答
Basically, I wish to modify my MySQL code style such that the following two queries would be acceptable:
SELECT first_name, last_name, birth_sex FROM owner
SELECT
first_name,
last_name,
birth_sex
FROM
owner
However, while it seems that DataGrip will allow the former format, I am unsure how to modify the format settings such that the second is permitted. Instead, DataGrip formats the second query as follows:
SELECT first_name,
last_name,
birth_sex
FROM owner
请先登录再写评论。
You need to set parameter 'Place elements' to 'New line' in File | Settings | Editor | Code Style | SQL | MySQL -> Queries tab to make it happen.
Yup. That did it. Thank you very much, Yuriy!
I am surprised that "Do not change" changes the format to the following, though, considering the wording: