Catalyst-TraitFor-Controller-jQuery-jqGrid-Search

 view release on metacpan or  search on metacpan

lib/Catalyst/TraitFor/Controller/jQuery/jqGrid/Search.pm  view on Meta::CPAN


=item * gt ( greater )

... WHERE searchField > searchString

=item * ge ( greater or equal )

... WHERE searchField >= searchString

=item * bw ( begins with )

... WHERE searchField like 'searchString%'

=item * bn ( does not begin with )

... WHERE searchField not like 'searchString%'

=item * in ( is in )

According to L<http://stackoverflow.com/questions/9383267/what-is-the-usage-of-jqgrid-search-is-in-and-is-not-in> 'in' and 'ni' are
not set-based operators (C<WHERE field IN (val1,val2,val3)>) but are: "I<... the equivalents of contains and does not contain, with the operands reversed>", thus:

... WHERE searchB<String> like '%searchB<Field>%'

=item * ni ( is not in )

... WHERE searchB<String> not like '%searchB<Field>%'

=item * ew ( ends with )

... WHERE searchField like '%searchString'

=item * en ( does not end with )

... WHERE searchField not like '%searchString'

=item * cn ( contains )

... WHERE searchField like '%searchString%'

=item * nc ( does not contain )

... WHERE searchField not like '%searchString%'

=back

=head3 jqGrid Search Setup

In your jqGrid colModel options, be sure to set sensible search operators for each field in the B<sopt> option within B<searchoptions>.
For example, the various B<like>-like operators (B<bw>, B<ew>, etc.) probably don't make sense for a numeric field. Similarly, anything other
than B<eq> for a boolean field is unnecessary.

=head1 DEPENDENCIES

JSON - for parsing the jqGrid "complex search" parameter C<filters>.

=head1 AUTHOR

Scott R. Keszler, C<< <keszler at srkconsulting.com> >>

=head1 BUGS AND LIMITATIONS

Please report any bugs or feature requests to C<bug-catalyst-traitfor-controller-jquery-jqgrid-search at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-TraitFor-Controller-jQuery-jqGrid-Search>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Catalyst::TraitFor::Controller::jQuery::jqGrid::Search

You can also look for information at:

=over 4

=item * RT: CPAN's request tracker (report bugs here)

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-TraitFor-Controller-jQuery-jqGrid-Search>

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/Catalyst-TraitFor-Controller-jQuery-jqGrid-Search>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/Catalyst-TraitFor-Controller-jQuery-jqGrid-Search>

=item * Search CPAN

L<http://search.cpan.org/dist/Catalyst-TraitFor-Controller-jQuery-jqGrid-Search/>

=back

=head1 ACKNOWLEDGEMENTS

Thanks to Ian Docherty <pause@iandocherty.com> for L<Catalyst::TraitFor::Controller::jQuery::jqGrid|Catalyst::TraitFor::Controller::jQuery::jqGrid>,
which I used as a template for this code.

=head1 LICENSE AND COPYRIGHT

Copyright 2012 Scott R. Keszler.

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 L<http://dev.perl.org/licenses/> for more information.

=cut

1;    # End of Catalyst::TraitFor::Controller::jQuery::jqGrid::Search



( run in 1.847 second using v1.01-cache-2.11-cpan-39bf76dae61 )