added limit/offset capability to search_where
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Feb 2006 23:07:37 +0000 (23:07 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Feb 2006 23:07:37 +0000 (23:07 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3055 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher.pm

index 35237c2..fd8770c 100644 (file)
@@ -131,6 +131,17 @@ sub search_where {
        my $client = shift;
        my @args = @_;
 
+       if (ref($args[0]) eq 'HASH') {
+               if ($args[1]) {
+                       $args[1]{limit_dialect} = $self->{cdbi}->db_Main;
+               } else {
+                       $args[1] = {limit_dialect => $self->{cdbi}->db_Main };
+               }
+       } else {
+               $args[0] = { @args };
+               $args[1] = {limit_dialect => $self->{cdbi} };
+       }
+
        my $cdbi = $self->{cdbi};
 
        for my $obj ($cdbi->search_where(@args)) {