Search::Query::Dialect::SQL - SQL query dialect
my $query = Search::Query->parser( dialect => 'SQL' )->parse('foo'); print $query;
Search::Query::Dialect::SQL is a query dialect for Query objects returned by a Search::Query::Parser instance.
The SQL dialect class stringifies queries to work as SQL WHERE clauses. This behavior is similar to Search::QueryParser::SQL.
This class is a subclass of Search::Query::Dialect. Only new or overridden methods are documented here.
Called by new(). The new() constructor can accept the following params, which are also standard attribute accessors:
Default value is %.
%
Default value is "". Set to (for example) ` to quote each field name in stringify() as some SQL variants require that syntax (e.g. mysql).
`
Override the default field set in Search::Query::Parser.
Append wildcard() to all terms.
Prepend and append wildcard() to all terms.
The SQL reserved word for wildcard comparison. Default value is ILIKE.
ILIKE
The string to use for quoting strings. Default is '.
'
The string to use to pad fuzzified terms. Default is a single space .
Returns the Query object as a normalized string.
Called by stringify() to handle each Clause in the Query tree.
Overrides default to set fuzzy_op and fuzzy_not_op.
Returns "Search::Query::Field::SQL".
Peter Karman, <karman at cpan.org>
<karman at cpan.org>
Please report any bugs or feature requests to bug-search-query at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Search-Query. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-search-query at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Search::Query
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Search-Query
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Search-Query
CPAN Ratings
http://cpanratings.perl.org/d/Search-Query
Search CPAN
http://search.cpan.org/dist/Search-Query/
This module started as a fork of Search::QueryParser by Laurent Dami.
Copyright 2010 Peter Karman.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Search::Query, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Search::Query
CPAN shell
perl -MCPAN -e shell install Search::Query
For more information on module installation, please visit the detailed CPAN module installation guide.