- COPYRIGHT AND LICENSE
Search::QS::Filter - Incapsulation of a single filter element
use Search::QS::Filter; my $flt = new Search::QS::Filter; # parse query_string $flt->parse_qs($qs); # reconvert object to query_string print $flt->to_qs;
This object incapsulate a single filter element. Think of it about a single search element in an SQL string. Like
fullname = "Joe"
The field name to search
The operator to use between field and value
An ARRAYREF with values to search in field name. It should be expanded with OR concatenation. As an example,
after parsing produce
name => 'x', values => [1,2]
and in SQL syntax must be written like
x=1 or x=2
In field name it can be use ":" to separe field name by a tag. The idea is to distinguish different operation with same field name.
As an example
a>1 and a<5
If you set a field with $and:$groupvalue you set that this field in a AND group with other fields with same $groupvalue
As an example to
is traslated in
( d=9 AND c=2 ) OR ( d=3 and c=1 )
Like "andGroup()" but for OR operator
$perl_struct is an HASHREF which represents a query string like the one returned by "url_params_mixed" in URI::Encode. It parses the struct and extract filter informations
Return a query string of the internal rappresentation of the object
Return this object as a SQL search
Emiliano Bruni <firstname.lastname@example.org>
This software is copyright (c) 2019 by Emiliano Bruni.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.