On Tue, May 01, 2007 at 10:43:40AM +0200, H.Merijn Brand wrote:
> On Mon, 30 Apr 2007 14:56:37 +0100, Tim Bunce <[EMAIL PROTECTED]> wrote:
> 
> > I've just added this to the DBI docs:
> > 
> > =item C<ReadOnly> (boolean, inherited)
> > 
> > An application can set the C<ReadOnly> attribute of a handle to a true 
> > value to
> > indicate that it will not be attempting to make any changes (insert, delete,
> > update etc) using that handle or any children of it.
> > 
> > If the driver can make the handle truely read-only (by issing a statement 
> > like
> 
> s/issing/issuing/ ?

Yes, and s/truely/truly/ :)

> > "C<set transaction read only>" as needed, for example) then it should.
> > Otherwise the attribute is simply advisory.
> > 
> > A driver can set the C<ReadOnly> attribute itself to indicate that the data 
> > it
> > is connected to cannot be changed for some reason.
> > 
> > Library modules and proxy drivers can use the attribute to influence their 
> > behavior.
> > For example, the DBD::Gofer driver considers the C<ReadOnly> attribute when
> > making a decison about whether to retry an operation that failed.
> > 
> > =cut
> 
> Is it inherited?

Yeap.

> Do statement handles from a ReadOnly driver handle get
> the same attribute passed? If so: useful.

> I'd like to see that extended to be able to allow dirty reads or no-lock
> reads, whatever the database allows.

Those are too database specific to warrant adding to the DBI (and not
really related to to the role of the ReadOnly attribute).  Drivers can
always offer private ways to do such things.

Tim.

Reply via email to