diff options
author | Yorhel <git@yorhel.nl> | 2014-07-18 09:36:46 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2014-07-18 09:36:46 +0200 |
commit | 920226b34235bf79aa719fbb7519bf8532de85c3 (patch) | |
tree | c5e1824451fcbf98e5e88f903cc63034e7bc3367 /lib/Multi/API.pm | |
parent | 578d8e9ced5511e7165216296113fcd837037ee7 (diff) |
API: Add firstchar filter to get vn
Diffstat (limited to 'lib/Multi/API.pm')
-rw-r--r-- | lib/Multi/API.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm index b1b15d63..365d7ec0 100644 --- a/lib/Multi/API.pm +++ b/lib/Multi/API.pm @@ -507,6 +507,9 @@ sub get_vn { [ undef, "vr.original :op: ''", {qw|= = != <>|} ], [ str => 'vr.original :op: :value:', {qw|= = != <>|} ], [ str => 'vr.original ILIKE :value:', {'~',1}, process => \'like' ] + ], [ 'firstchar', + [ undef, '(:op: ((ASCII(vr.title) < 97 OR ASCII(vr.title) > 122) AND (ASCII(vr.title) < 65 OR ASCII(vr.title) > 90)))', {'=', '', '!=', 'NOT'} ], + [ str => 'LOWER(SUBSTR(vr.title, 1, 1)) :op: :value:' => {qw|= = != <>|}, process => sub { shift =~ /^([a-z])$/ ? $1 : \'Invalid character' } ], ], [ 'released', [ undef, 'v.c_released :op: 0', {qw|= = != <>|} ], [ str => 'v.c_released :op: :value:', {qw|= = != <> > > < < <= <= >= >=|}, process => \&parsedate ], |