The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SQL::OOP::Order - ORDER BY class

SYNOPSIS

    $order = SQL::OOP::Order->new('a', 'b');
    $order->to_string;
    $order->bind;

DESCRIPTION

SQL::OOP::Order class represents ORDER BY clause.

SQL::OOP::Order->new(@array);

Constructor.

    my $order = SQL::OOP::Order->new('a', 'b', 'c');
    
    $order->to_string ## "a", "b", "c"

$instance->append_asc($key);

$instance->append_desc($key);

    my $order = SQL::OOP::Order->new;
    $order->append_asc('age');
    $order->append_desc('address');
    $order->to_string; # "age", "address" DESC

SQL::OOP::Order->new_asc();

Constructor for ASC expression. This returns SQL::OOP::Order::Expression instance which can be thrown at SQL::OOP::Order class constructor or instances.

SQL::OOP::Order->new_desc();

Constructor for DESC expression. This returns SQL::OOP::Order::Expression instance which can be thrown at SQL::OOP::Order class Constructor or instances.

SQL::OOP::Order->abstract

Construct by array ref

    SQL::OOP::Order->abstract([['col1', 1], 'col2']);   # "col1" DESC, "col2"
    SQL::OOP::Order->abstract([['col1', 1], ['col2']]); # "col1" DESC, "col2"

$instance->append_asc

Append ASC entry

$instance->append_desc

Append DESC entry

$instance->fix_element_in_list_context

Internal use.

SEE ALSO