Subject: | Bug/Enhancement with "ORDER BY" version 0.01 |
Date: | Thu, 26 Mar 2009 14:27:00 -0400 |
To: | bug-SQL-Beautify [...] rt.cpan.org |
From: | Joe Atzberger <joe.atzberger [...] liblime.com> |
The beautify sub seems to miss breaking at "ORDER BY" statements.
Command line:
$ perl -e 'use SQL::Beautify; my $b = SQL::Beautify->new(query=>
"SELECT
borrowers.cardnumber,borrowers.surname,borrowers.firstname,borrowers.email
FROM
borrowers WHERE borrowers.branchcode=\"MAIN\" ORDER BY borrowers.surname
, borrowers.firstname;"
); print $b->beautify, "\n";'
Outputs:
SELECT
borrowers.cardnumber,
borrowers.surname,
borrowers.firstname,
borrowers.email
FROM
borrowers
WHERE
borrowers.branchcode = "MAIN" ORDER BY
borrowers.surname,
borrowers.firstname ;