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