SQL::OOP::Order - ORDER BY class
$order = SQL::OOP::Order->new('a', 'b'); $order->to_string; $order->bind;
SQL::OOP::Order class represents ORDER BY clause.
Constructor.
my $order = SQL::OOP::Order->new('a', 'b', 'c'); $order->to_string ## "a", "b", "c"
my $order = SQL::OOP::Order->new; $order->append_asc('age'); $order->append_desc('address'); $order->to_string; # "age", "address" DESC
Constructor for ASC expression. This returns SQL::OOP::Order::Expression instance which can be thrown at SQL::OOP::Order class constructor or instances.
Constructor for DESC expression. This returns SQL::OOP::Order::Expression instance which can be thrown at SQL::OOP::Order class Constructor or instances.
Construct by array ref
SQL::OOP::Order->abstract([['col1', 1], 'col2']); # "col1" DESC, "col2" SQL::OOP::Order->abstract([['col1', 1], ['col2']]); # "col1" DESC, "col2"
Append ASC entry
Append DESC entry
Internal use.
Sugama Keita, <sugama@jamadam.com>
Copyright (C) 2011 by Sugama Keita.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install SQL::OOP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SQL::OOP
CPAN shell
perl -MCPAN -e shell install SQL::OOP
For more information on module installation, please visit the detailed CPAN module installation guide.