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>
Sat, 17 Mar 2012 18:24:38 +0000 (14:24 -0400)
commit0efa45af700f1f24fb6c8df09572eadb48347302
tree390e4966e06ca0933a11b6f9064c762bfe8689e9
parent8a3ebec145c81c43ae3ab6376d45f1aa0648f66b
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