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/ ? > "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? 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. -- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using & porting perl 5.6.2, 5.8.x, 5.9.x on HP-UX 10.20, 11.00, 11.11, & 11.23, SuSE 10.0 & 10.2, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org http://mirrors.develooper.com/hpux/ http://www.test-smoke.org http://www.goldmark.org/jeff/stupid-disclaimers/