Text::Query::BuildSQL - Base class for SQL query builders
package Text::Query::BuildSQLsqldb; use Text::Query::BuildSQL; use vars qw(@ISA); @ISA = qw(Text::Query::BuildSQL);
Defines all the build_* functions to build a syntactic tree. The tree nodes are [ operator scope operand operand... ]. The build_final_expression function translate the syntactic tree in a where clause using the resolve method. If the scope of the search is not specified (simple query or advanced query without scope operator), the scope is set to the list of comma separated fields provided by the -fields_searched option. The resulting where clause is placed in the select order provided with the -select option, if any.
build_*
build_final_expression
where
resolve
-fields_searched
select
-select
Returns a where clause string corresponding to the Q1 syntactic tree.
Q1
Translate the mandatory and forbiden syntactic nodes to their boolean equivalents.
mandatory
forbiden
If provided the string returned by build_final_expression substitutes the __WHERE__ tag with the where string generated by the resolve function. The substituted string is the return value of the build_final_expression.
__WHERE__
If not set the return value of the build_final_expression is the result of the resolve function.
FIELDS_LIST is a list of comma separated field names. It is used as the default scope if no scope is provided in the query string. The build_final_expression function will croak if this option is not provided and no scope operator were used.
FIELDS_LIST
croak
Text::Query(3) Text::Query::Build(3)
Loic Dachary (loic@senga.org)
To install Text::Query::BuildSQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Query::BuildSQL
CPAN shell
perl -MCPAN -e shell install Text::Query::BuildSQL
For more information on module installation, please visit the detailed CPAN module installation guide.