NAME
Dezi::Admin::Utils - Dezi administration utility functions
SYNOPSIS
use Dezi::Admin::Utils;
my %sql = Dezi::Admin::Utils::params_to_sql(
   $req, 
   $table_name, 
   [qw( name color )]
);
       
DESCRIPTION
Dezi::Admin utility functions.
FUNCTIONS
json_mime_type
Returns appropriate MIME type string.
params_to_sql( plack_request, table_name[, columns] )
Returns SQL derived from incoming parameters in plack_request. Key/value pairs are returned, where keys are:
- sql
 - 
SQL string returning matching rows
 - count
 - 
SQL string returning total count
 - args
 - 
Array of values to be passed to $sth->execute(). May be undefined, in which case do not pass to execute().
 - where
 - 
WHERE clause.
 - order_by
 - 
ORDER BY clause.
 - limit
 - 
Integer
 - offset
 - 
Integer
 - sort
 - 
Column name in ORDER BY clause.
item direction
ORDER BY direction (
ASCorDESC). 
Options columns should be an array ref of column names for where.
AUTHOR
Peter Karman, <karman at cpan.org>
BUGS
Please report any bugs or feature requests to bug-dezi-admin at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dezi-Admin. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Dezi::Admin
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
COPYRIGHT & LICENSE
Copyright 2013 Peter Karman.
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 http://dev.perl.org/licenses/ for more information.