unapi: rank returned volumes and copies by library
authorDan Scott <dan@coffeecode.net>
Sat, 10 Mar 2012 23:28:24 +0000 (18:28 -0500)
committerDan Scott <dan@coffeecode.net>
Thu, 15 Mar 2012 04:34:32 +0000 (00:34 -0400)
commit89c1cae42fab4bffe3aeda5372545e833788a8af
tree4bf6034be4429b751e2fde632fa02c386c1e689d
parentf7458373634197e69c5d05dc053ee44cf59c8778
unapi: rank returned volumes and copies by library

Introduce another unapi argument, "pref_lib", to identify the user's
preferred library, and provide a corresponding routine that calculates
the rank of a particular library given "pref_lib" and "search_lib" as
arguments.

Then sort the call numbers and copies that are returned according to the
rank of the corresponding library, rather than strictly alphabetically
by library name.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/src/sql/Pg/990.schema.unapi.sql