Re: [DBI] new attribute for executed statement
- From: Tim.Bunce@xxxxxxxxx (Tim Bunce)
- Date: Mon, 19 Dec 2005 23:20:48 +0000
On Mon, Dec 19, 2005 at 11:47:59PM +0100, module@xxxxxxxxxxxxxxxx wrote:
> Hi Tim,
>
> is it possible to introduce one new "field" (attribute) for an executed
> statement?
>
> With $sth->{Statement} you just get the "prepared" statement, but if you
> use placeholders and you want to see the executed statement, this is not
> very helpful.
For many databases the placeholders are effectively merged into the
statement on the server, in which case the client may not be able to
produce an SQL statement that matches exactly what the server will do.
(Consider attributes to bind_param() that alter behaviour, for example.)
The ParamValues attribute may be of use to you, if your driver supports
it. See archives for previous discussions on this topic:
http://www.google.com/search?q=ParamValues+bunce
If your driver emulates placeholder itself then it could add a
driver-private attribute that provides the expended statement.
> Kind Regards,
> Renee
>
> P.S.: DBI is a great module! You did a great work!
Thanks.
Tim.
p.s. Please send emails to dbi-users@xxxxxxxx
.
- Prev by Date: Re: tim bunce
- Next by Date: RE: Oracle 10g + Linux RHEL 4 + Perl + DBI = OCIEnvNlsCreate Error (!?!?)
- Previous by thread: tim bunce
- Next by thread: problems in building perl-DBI
- Index(es):
Relevant Pages
|
|