Clustericious::RouteBuilder::Search - build routes for searching for objects
version 1.29
use My::Object::Class; use Clustericious::RouteBuilder; use Clustericious::RouteBuilder::Search "search", "plurals", defaults => { manager_finder => "Manager::Finder::Class" }, ; ... post => "/:plural/search" => [ plural => [ plurals() ] ] => \&do_create;
This automates the creation of routes for searching for objects.
Manager::Finder::Class must provide the following methods :
given the plural of a table, look up the name of the class
The route that is created turns a JSON structure which is input as POST data into parameters for Rose::DB::Object::Manager::get_objects.
Additionally a "mode" parameters is supported, which just calls a search_$mode method within the manager class, and returns that result set to the client.
none
Clustericious
Original author: Brian Duggan
Current maintainer: Graham Ollis <plicease@cpan.org>
Contributors:
Curt Tilmes
Yanick Champoux
This software is copyright (c) 2013 by NASA GSFC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Clustericious, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Clustericious
CPAN shell
perl -MCPAN -e shell install Clustericious
For more information on module installation, please visit the detailed CPAN module installation guide.