add format command
[scpubgit/Q-Branch.git] / t / 11unparse.t
CommitLineData
d49e5323 1use strict;
2use warnings;
3
4use SQL::Abstract::Tree;
5
6{
7 my $sql = "SELECT a, b, c
8 FROM foo WHERE foo.a =1 and foo.b LIKE 'station'";
9
10 print "$sql\n";
203ce7d3 11 print SQL::Abstract::Tree::format($sql) . "\n";
d49e5323 12}
13
14{
15 my $sql = "SELECT *
16 FROM (SELECT * FROM foobar) WHERE foo.a =1 and foo.b LIKE 'station'";
17
18 print "$sql\n";
203ce7d3 19 print SQL::Abstract::Tree::format($sql) . "\n";
d49e5323 20}
21
22# stuff we want:
23# Nested indentation
24# Max Width
25# Color coding (console)
26# Color coding (html)