Commit | Line | Data |
d49e5323 |
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::unparse(SQL::Abstract::Tree::parse($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::unparse(SQL::Abstract::Tree::parse($sql)) . "\n"; |
20 | } |
21 | |
22 | # stuff we want: |
23 | # Nested indentation |
24 | # Max Width |
25 | # Color coding (console) |
26 | # Color coding (html) |