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>
Sun, 11 Mar 2012 01:06:34 +0000 (20:06 -0500)
commitc9024ed5ffc51ce3d3ca4b526d3959e3626e7fd2
tree38c073424b1107f7f44ab562cf6886d117a325b5
parent64a5fda53a779ff4e8a0c4f724c4a28d6138a71c
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