[open-ils-commits] r15384 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Search (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jan 25 16:08:10 EST 2010
Author: phasefx
Date: 2010-01-25 16:08:05 -0500 (Mon, 25 Jan 2010)
New Revision: 15384
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
open-ils.search.biblio.isbn_list [ isbn1, isbn2, ... ]. This is making multiple calls to storage; we may want to implement it with one SQL query. May also want to rename the method from .isbn_list to .isbn.batch
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-01-25 19:31:26 UTC (rev 15383)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-01-25 21:08:05 UTC (rev 15384)
@@ -1530,7 +1530,22 @@
return { ids => $recs, count => scalar(@$recs) };
}
+__PACKAGE__->register_method(
+ method => "biblio_search_isbn_batch",
+ api_name => "open-ils.search.biblio.isbn_list",
+);
+sub biblio_search_isbn_batch {
+ my( $self, $client, $isbn_list ) = @_;
+ $logger->debug("Searching ISBNs @$isbn_list");
+ my $e = new_editor();
+ my @recs = ();
+ @recs = ( @recs, @{ $U->storagereq(
+ 'open-ils.storage.id_list.biblio.record_entry.search.isbn.atomic', $_ )
+ } ) for @$isbn_list;
+ return { ids => \@recs, count => scalar(@recs) };
+}
+
__PACKAGE__->register_method(
method => "biblio_search_issn",
api_name => "open-ils.search.biblio.issn",
More information about the open-ils-commits
mailing list