The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Search::QS::Filters - A collection of Search::QS::Filter

VERSION

version 0.04

SYNOPSIS

  use Search::QS::Filters;

  my $flts = new Search::QS::Filters;
  # parse query_string
  $flts->parse_qs($qs);
  # reconvert object to query_string
  print $flts->to_qs;

DESCRIPTION

This object incapsulate multiple filter elements as a collection of Search::QS::Filter

METHODS

parse($perl_struct)

$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

to_qs()

Return a query string of the internal rappresentation of the object

to_sql

Return this object as a SQL search

as_groups()

Return an HASHREF with 3 keys:

and

An HASHREF with keys the andGroup keys and elements the filters with the same andGroup key

or

An HASHREF with keys the orGroup keys and elements the filters with the same orGroup key

nogroup

An ARRAYREF with all filters non in a and/or-Group.

AUTHOR

Emiliano Bruni <info@ebruni.it>

COPYRIGHT AND LICENSE

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.