Re: SQL::Statement parsing
- From: jeff@xxxxxxxxxxxxxx (Jeff Zucker)
- Date: Wed, 26 Oct 2005 18:48:28 -0700
John Cougar wrote:
IMHO, the API would be neater is it contained "parse_ok()" method - orI think the best thing is for me to follow DBI and have an err() method which returns true if an error has occurred, e.g.
something similar - to provide an explicit test for successful parsing,
without having to enquire against errstr() as a (almost) side-effect.
my_error_handler( $stmt->errstr ) if $stmt->err;
In fact, I should probably allow users to pass an error-handling coderef to the parser.
On the other hand, why do you (as, indeed, does PostgreSQL) enforce the useHmm, darn, I'm inconsistent - the AS is optional on table aliases but required on column aliases. I'll add that to the to-do list, thanks.
of the 'AS' keyword in column aliasing? Just a question, AS is optional in
SQL'92.
I will
contributed patches as requested ... chat to you offline about this, dude!
Thanks much!
PS> On the Structure.pod, it says users should instantiate a parser and pass
the instance variable into the Statement constructor as an argument. In your
reply, you just created Statement->new($sql). I know that this works, but
what is the default dialect?
AnyData.
-- Jeff .
- References:
- RE: SQL::Statement parsing
- From: John Cougar
- RE: SQL::Statement parsing
- Prev by Date: RE: SQL::Statement parsing
- Next by Date: Re: Disabling Apache::DBI
- Previous by thread: RE: SQL::Statement parsing
- Next by thread: Install with ppm of DBD::Oracle
- Index(es):