https://bugs.freedesktop.org/show_bug.cgi?id=46841

--- Comment #4 from Juetho <fo...@vs-polis.de> ---
Reproduced using LibO Version 3.6.3.2 (Build ID: 58f22d5) on Windows 7 Home
Premium 64-bit

@Lionel
IMHO it's better to insert more newlines than less to create or save clearly
arranged SQL code. If you need regeneration of SQL code, you should insert
newlines at the following places:

* before each FROM, WHERE, GROUP BY, HAVING, ORDER BY, UNION
* after UNION
* before each JOIN:
** [INNER] JOIN
** LEFT | RIGHT [OUTER] JOIN
** CROSS JOIN
* before each AND in WHERE clause 
* after each comma in the column list
* after a closing bracket in WHERE clause 
** but not between two closing brackets like (a AND (b OR c)) OR (d AND e)
* before WHEN and ELSE in CASE...END

The newline should be indented by spaces:
* 0 before SELECT, UNION
* 7 within column list
* 2 before FROM, JOINs 
* 2 before WHERE, GROUP BY, HAVING, ORDER BY
* 7 within WHERE clause

There are more conceivable rules, but IMHO not necessary.

Hope this way can be realized in near future. Juergen

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to