SQL::Abstract::FromQuery::Contains - SQL::Abstract::FromQuery extension for a 'contains' rule
my $parser = SQL::Abstract::FromQuery->new( -components => [qw/Contains/], -fields => { contains => [qw/fulltext1 fulltext2/], } );
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
contains_any
{-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.
-contains
Laurent Dami, <laurent.dami AT justice.ge.ch>
<laurent.dami AT justice.ge.ch>
To install SQL::Abstract::FromQuery, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SQL::Abstract::FromQuery
CPAN shell
perl -MCPAN -e shell install SQL::Abstract::FromQuery
For more information on module installation, please visit the detailed CPAN module installation guide.