]> git.evergreen-ils.org Git - Evergreen.git/commit - Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
Prevent tag array from growing insanely in supercat browses
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 7 Jan 2011 04:58:05 +0000 (04:58 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 7 Jan 2011 04:58:05 +0000 (04:58 +0000)
commit2499e3241059f9de42abfb536316eedb70f9723d
tree4424f3f36872e696aec3fd32e206b4a67c205ba2
parent777e0f9de88cc2399f0457a96fde0864c3f28493
Prevent tag array from growing insanely in supercat browses

Modifying the passed-in tag array reference apparently resulted
in those changes persisting to the next call, growing the tag
array at a rapid clip. So we needed to clean that up.

Also, applying the DISTINCT transform to the afr.record column, while
a valiant effort, didn't actually work. distinct() is not DISTINCT
ON () for starters; also, because DISTINCT ON needs to have the
ORDER BY clause match its arguments, and we actually want to order
by afr.value, not afr.record.

We could do it in a subquery, then reorder by value in the outer
SELECT, but it's not clear that json_query supports DISTINCT ON
anyway. Some days I wish I could just write SQL.

We could retrieve only the afr.record column - it's not clear that
any callers actually need the naco-normalized value column - but
that seems like a pretty major change at this point.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19132 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm