Skip to content

WIP 239 pt shorten lines in static sql

Peter Tönnies requested to merge 239-PT-shorten-lines-in-staticSQL into master

Closes issues0#239

This needs to be tested first as I do not know the rules for line breaking in SQL and I could not find anything.

In order to reproduce what I have done:

  • Open the file in notepad++ and open the Find menu
  • in the Replace tab set "Match case" and "Extended" and do a "Replace All" on "Find what : \\r\\n" and "Replace with : \\r\\n\n"
  • in the Replace tab set "Match case" and "Extended" and do a "Replace All" on "Find what : </p><p>" and "Replace with : </p>\n<p>"
  • in the Replace tab set "Match case" and "Extended" and do a "Replace All" on "Find what : <br />" and "Replace with : <br />\n"
  • in the Replace tab set "Match case" and "Extended" and do a "Find Next" on "Find what : \n\r" and "Replace with : <br />\n". If a double line or a blank line in the middle of an SQL statement is found, hit "Replace". This is manual work but done very quickly.

A RegEx search ^.{4500,} in the Mark tab with "Regular expression" selected resulted in two positive lines. Before this PR, this was given for ^.{26900,}. This corresponds to a longest-line-reduction of over 85 %.

Edited by Peter Tönnies

Merge request reports