my @list = ();
- if ($page <= 0) {
+ if ($page < 0) {
my $before = $_storage->request(
"open-ils.cstore.json_query.atomic",
- { select => { afr => [qw/record value/] },
+ { select => { afr => [
+ { transform => "distinct", column => "record" },
+ "value" ]},
from => { 'are', 'afr' },
where => {
'+afr' => { tag => $tag, subfield => $subfield, value => { '<' => lc($value) } },
if ($page >= 0) {
my $after = $_storage->request(
"open-ils.cstore.json_query.atomic",
- { select => { afr => [qw/record value/] },
+ { select => { afr => [
+ { transform => "distinct", column => "record" },
+ "value" ]},
from => { 'are', 'afr' },
where => {
'+afr' => { tag => $tag, subfield => $subfield, value => { '>=' => lc($value) } },
my $before = $_storage->request(
"open-ils.cstore.json_query.atomic",
- { select => { afr => [qw/record value/] },
+ { select => { afr => [
+ { transform => "distinct", column => "record" },
+ "value" ]},
from => { 'afr', 'are' },
where => {
'+afr' => { tag => $tag, subfield => $subfield, value => { '<' => lc($value) } },
if ($page >= 0) {
my $after = $_storage->request(
"open-ils.cstore.json_query.atomic",
- { select => { afr => [qw/record value/] },
+ { select => { afr => [
+ { transform => "distinct", column => "record" },
+ "value" ]},
from => { 'afr', 'are' },
where => {
'+afr' => { tag => $tag, subfield => $subfield, value => { '>=' => lc($value) } },