in reply to Parse and change an SQL statement

In fact, SQL::Statement appears to be unusable even for just parsing. The key function is column_defs(), which is supposed to return the columns in the statement; and it isn't defined. Trying to execute
our $SqlParser = SQL::Parser->new() or die "Could not create an SQL::P +arser"; my $parse = SQL::Statement->new('SELECT foo FROM bar', $SqlParser); my @columns = $parse->column_defs();
results in the error
Can't locate object method "column_defs" via package "SQL::Statement" +at /local/ifs_projects/prok/function/src/lib/pgoetzUtils.pm line 939.

Replies are listed 'Best First'.
Re^2: Parse and change an SQL statement
by CountZero (Bishop) on Mar 20, 2012 at 15:59 UTC