]> git.evergreen-ils.org Git - working/Evergreen.git/commit
QueryParser Driver: Long Line Cleanup
authorThomas Berezansky <tsbere@mvlc.org>
Fri, 14 Sep 2012 16:15:40 +0000 (12:15 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 15 Feb 2013 20:39:49 +0000 (15:39 -0500)
commitb4fb02f964b88d4848a2fb0e2d242ed8b3cb5fcf
tree0fb597bebb15e5d1641cb5056a8bc989c6d18dd8
parentc05bd342e188daa04972d31c00909b81d056e78c
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>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm