Graham Ollis > Clustericious > Clustericious::RouteBuilder::Search

Download:
Clustericious-0.9936.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.9936   Source  

NAME ^

Clustericious::RouteBuilder::Search - build routes for searching for objects

VERSION ^

version 0.9936

SYNOPSIS ^

    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;

DESCRIPTION ^

This automates the creation of routes for searching for objects.

Manager::Finder::Class must provide the following methods :

lookup_class

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.

SUPER CLASS ^

none

SEE ALSO ^

Clustericious

AUTHOR ^

original author: Brian Duggan

current maintainer: Graham Ollis <plicease@cpan.org>

contributors:

Curt Tilmes

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: