add some docs
[scpubgit/Q-Branch.git] / lib / SQL / Abstract / Tree.pm
index 190ae41..78d496a 100644 (file)
@@ -151,10 +151,10 @@ eval {
       'delete from' => [Term::ANSIColor::color('red'), Term::ANSIColor::color('reset')],
 
       set           => [Term::ANSIColor::color('cyan'), Term::ANSIColor::color('reset')],
+      from          => [Term::ANSIColor::color('cyan'), Term::ANSIColor::color('reset')],
 
       where         => [Term::ANSIColor::color('green'), Term::ANSIColor::color('reset')],
       values        => [Term::ANSIColor::color('yellow'), Term::ANSIColor::color('reset')],
-      from          => [Term::ANSIColor::color('yellow'), Term::ANSIColor::color('reset')],
 
       join          => [Term::ANSIColor::color('magenta'), Term::ANSIColor::color('reset')],
       'left join'   => [Term::ANSIColor::color('magenta'), Term::ANSIColor::color('reset')],
@@ -346,3 +346,14 @@ sub format { my $self = shift; $self->unparse($self->parse(@_)) }
  #   FROM foo
  #   WHERE foo.a > 2
 
+=head1 METHODS
+
+=head2 new
+
+ my $sqla_tree = SQL::Abstract::Tree->new({ profile => 'console' });
+
+=head2 format
+
+ $sqlat->format('SELECT * FROM bar')
+
+Returns a formatting string based on wthe string passed in