QueryParser Driver: Long Line Cleanup
authorThomas Berezansky <tsbere@mvlc.org>
Fri, 14 Sep 2012 16:15:40 +0000 (12:15 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Thu, 20 Dec 2012 15:38:05 +0000 (10:38 -0500)
commit9c85dcf7b1c716b25e9f9127325a3cd5ad952921
tree36866d179587040cf3dcc93bebde594ce29c5787
parentbf61f13ec5e34684374915765d515c90e7383458
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>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm