Catalyst::Controller::DBIC::API::RequestArguments - Provides Request argument validation
version 2.009000
RequestArguments embodies those arguments that are provided as part of a request or effect validation on request arguments. This Role can be consumed in one of two ways. As this is a parameterized Role, it accepts a single argument at composition time: 'static'. This indicates that those parameters should be stored statically and used as a fallback when the current request doesn't provide them.
The number of rows to be returned during paging.
What page to return while paging.
Specifies where to start the paged result (think SQL LIMIT).
Is passed to ->search to determine sorting.
Is passed to ->search to determine aggregate results.
Is passed to ->search to optimize the number of database fetches for joins.
Limits what can actually be searched. If a certain column isn't indexed or perhaps a BLOB, you can explicitly say which columns can be search to exclude that one.
Like the synopsis in DBIC::API shows, you can declare a "template" of what is allowed (by using '*'). Each element passed in, will be converted into a Data::DPath and added to the validator.
Contains the raw search parameters. Upon setting, a trigger will fire to format them, set search_parameters and search_attributes.
Please see "generate_parameters_attributes" for details on how the format works.
Stores the formatted search parameters that will be passed to ->search.
Stores the formatted search attributes that will be passed to ->search.
Stores the total number of entries in a paged search result.
Limits what can actually be selected. Use this to whitelist database functions (such as COUNT).
Is the search attribute that allows you to both limit what is returned in the result set and also make use of database functions like COUNT.
Please see "select" in DBIx::Class::ResultSet for more details.
Is the search attribute compliment to "select" that allows you to label columns for object inflaction and actually reference database functions like COUNT.
Please see "as" in DBIx::Class::ResultSet for more details.
Holds the top level JoinBuilder object used to keep track of joins automagically while formatting complex search parameters.
Provides the method 'build_joins' which returns the 'join' attribute for search_attributes.
Holds the raw (but deserialized) data for this request.
A Catalyst::Controller::DBIC::API::Validator instance used solely to validate search parameters.
A Catalyst::Controller::DBIC::API::Validator instance used solely to validate select parameters.
A Catalyst::Controller::DBIC::API::Validator instance used solely to validate prefetch parameters.
Iterates through the provided arrayref calling generate_column_parameters on each one.
Recursively generates properly aliased parameters for search building a new JoinBuilder each layer of recursion.
Takes the raw search arguments and formats them by calling format_search_parameters. Then builds the related attributes, preferring request-provided arguments for things like grouped_by over statically configured options. Finally tacking on the appropriate joins.
Returns a list of both formatted search parameters and attributes.
Nicholas Perez <nperez@cpan.org>
Luke Saunders <luke.saunders@gmail.com>
Alexander Hartmaier <abraxxa@cpan.org>
Florian Ragwitz <rafl@debian.org>
Oleg Kostyuk <cub.uanic@gmail.com>
Samuel Kaufman <sam@socialflow.com>
This software is copyright (c) 2024 by Luke Saunders, Nicholas Perez, Alexander Hartmaier, et al.
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 Catalyst::Controller::DBIC::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Controller::DBIC::API
CPAN shell
perl -MCPAN -e shell install Catalyst::Controller::DBIC::API
For more information on module installation, please visit the detailed CPAN module installation guide.