7aebc7d4361aef2b63d6532b476366685c58aca1
[scpubgit/Q-Branch.git] / t / 11unparse.t
1 use strict;
2 use warnings;
3
4 use 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";
11    print SQL::Abstract::Tree::format($sql) . "\n";
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";
19    print SQL::Abstract::Tree::format($sql) . "\n";
20 }
21
22 # stuff we want:
23 #    Nested indentation
24 #    Max Width
25 #    Color coding (console)
26 #    Color coding (html)