Class::ReluctantORM::SQL::OrderBy - Represent an ORDER BY clause in a SQL statement
my $ob = Class::ReluctantORM::SQL::OrderBy->new(); $ob->add($col); $ob->add($col, 'DESC'); @cols = $ob->columns();
Constructor. No arguments.
Lists the Class::ReluctantORM::SQL::Columns in the order by clause, in order of occurence. No sort direction is provided.
Returns a list of (non-unique) tables referenced in the clause.
Returns an array of two-element arrays. In each subarry, the first element is the Class::ReluctantORM::SQL::Column, and the second is the sort direction (either 'ASC' or 'DESC').
Adds a sort criteria to the clause. $col is a Class::ReluctantORM::SQL::Column. $direction is either of the strings 'ASC' or 'DESC', default 'ASC'.
Outputs the clause as a human-readable, driver-neutral string. Useless for SQL execution.
Deeply clones each sort expression, and copies each direction.
To install Class::ReluctantORM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::ReluctantORM
CPAN shell
perl -MCPAN -e shell install Class::ReluctantORM
For more information on module installation, please visit the detailed CPAN module installation guide.