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

NAME

SQL::Abstract::FromQuery::Contains - SQL::Abstract::FromQuery extension for a 'contains' rule

SYNOPSIS

  my $parser = SQL::Abstract::FromQuery->new(
    -components => [qw/Contains/],
    -fields => {
       contains => [qw/fulltext1 fulltext2/],
     }
  );

DESCRIPTION

This component adds rules contains and contains_any to the root grammar. The purpose is to generate fulltext queries to the database on some specific fields. Fields associated to such rules will generate structures of shape

  {-contains => $list_of_words }
  # or
  {-contains_any => $list_of_words }

This is meant to work in collaboration with "SPECIAL OPERATORS" in SQL::Abstract. So the job of the present module is only to mark the query on this field as a fulltext query; then you should define a special operator named -contains within your SQL::Abstract instance, so that this can be translated to appropriate SQL for your database.

AUTHOR

Laurent Dami, <laurent.dami AT justice.ge.ch>