QueryParser Driver: Long Line Cleanup
authorThomas Berezansky <tsbere@mvlc.org>
Fri, 14 Sep 2012 16:15:40 +0000 (12:15 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 30 Jan 2013 16:29:27 +0000 (11:29 -0500)
commite51907237c6193ba352df6669372b4b924a1c8f9
tree10683c55f9fc6722a94a026a275e608e9ab5de1e
parentf8061860b02de34eee2ca039ed27a585c2c62c41
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