QueryParser Driver: Long Line Cleanup
authorThomas Berezansky <tsbere@mvlc.org>
Fri, 14 Sep 2012 16:15:40 +0000 (12:15 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 27 Nov 2012 19:19:07 +0000 (14:19 -0500)
commit2cba3ee2fca82fc8c32c6c6c44845c4ba080671f
tree99d116b1dcbd51b61ded20aa7f9aeb5ce6d7937e
parente4cd4225a3832c39e9954fdcf42915e635c99576
QueryParser Driver: Long Line Cleanup

Both in the code and in the generated where clause.

The where clause we start a new line whenever:

1 - We encounter an AND or OR
2 - We are building a complex subquery (including embedded newlines)
3 - We enter a subplan

This makes for a nicely human-readable where clause.

For the code we split many long lines into multiple. A number of those were
changed due to the where clause formatting.

We also change all instances of multiple ${spc} being added to use the
${spc} x #
method of doing things, as it tends to be shorter.

Also, we move some conditionals from the ends of lines to the fronts, mainly
in those situations where we are moving something from single to multi line.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm