go ahead and use the new index if we need to
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 16 Oct 2010 15:38:21 +0000 (15:38 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 16 Oct 2010 15:38:21 +0000 (15:38 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18366 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm

index 5c6f1d0..de5bdf9 100644 (file)
@@ -305,7 +305,7 @@ sub cn_browse {
                        },
                        { flesh         => 1,
                          flesh_fields  => { acn => [qw/record owning_lib/] },
-                         order_by      => { acn => "oils_text_as_bytea(label_sortkey) desc, upper(label) desc, id desc, owning_lib desc" },
+                         order_by      => { acn => "oils_text_as_bytea(label_sortkey) desc, oils_text_as_bytea(upper(label)) desc, id desc, owning_lib desc" },
                          limit         => $before_limit,
                          offset        => abs($page) * $page_size - $before_offset,
                        }
@@ -323,7 +323,7 @@ sub cn_browse {
                        },
                        { flesh         => 1,
                          flesh_fields  => { acn => [qw/record owning_lib/] },
-                         order_by      => { acn => "oils_text_as_bytea(label_sortkey), upper(label), id, owning_lib" },
+                         order_by      => { acn => "oils_text_as_bytea(label_sortkey), oils_text_as_bytea(upper(label)), id, owning_lib" },
                          limit         => $after_limit,
                          offset        => abs($page) * $page_size - $after_offset,
                        }
@@ -428,7 +428,7 @@ sub cn_startwith {
                        },
                        { flesh         => 1,
                          flesh_fields  => { acn => [qw/record owning_lib/] },
-                         order_by      => { acn => "oils_text_as_bytea(label_sortkey) desc, upper(label) desc, id desc, owning_lib desc" },
+                         order_by      => { acn => "oils_text_as_bytea(label_sortkey) desc, oils_text_as_bytea(upper(label)) desc, id desc, owning_lib desc" },
                          limit         => $limit,
                          offset        => $offset,
                        }
@@ -446,7 +446,7 @@ sub cn_startwith {
                        },
                        { flesh         => 1,
                          flesh_fields  => { acn => [qw/record owning_lib/] },
-                         order_by      => { acn => "oils_text_as_bytea(label_sortkey), upper(label), id, owning_lib" },
+                         order_by      => { acn => "oils_text_as_bytea(label_sortkey), oils_text_as_bytea(upper(label)), id, owning_lib" },
                          limit         => $limit,
                          offset        => $offset,
                        }