Re: Proposal for new $h->{ReadOnly} attribute

Re: Proposal for new $h->{ReadOnly} attribute

am 30.04.2007 16:39:05 von jochen.wiedmann

On 4/30/07, Tim Bunce wrote:

> If the driver can make the handle truely read-only (by issing a statement like
> "C" as needed, for example) then it should.
> Otherwise the attribute is simply advisory.

For reading the value, I agree. I'd like to see a third value when
writing. This third value could mean "Make it read-only, if you can,
otherwise throw an exception".

Jochen

--
My cats know that I am a loser who goes out for hunting every day
without ever returning as much as a single mouse. Fortunately, I've
got a wife who's a real champ: She leaves the house and returns within
half an hour, carrying whole bags full of meal.

Re: Proposal for new $h->{ReadOnly} attribute

am 01.05.2007 01:04:51 von Tim.Bunce

On Mon, Apr 30, 2007 at 04:39:05PM +0200, Jochen Wiedmann wrote:
> On 4/30/07, Tim Bunce wrote:
>
> >If the driver can make the handle truely read-only (by issing a statement
> >like
> >"C" as needed, for example) then it should.
> >Otherwise the attribute is simply advisory.
>
> For reading the value, I agree. I'd like to see a third value when
> writing. This third value could mean "Make it read-only, if you can,
> otherwise throw an exception".

I can see some value in it, I'm just not sure it's worth it.

There's the question of picking 'magic value' to represent it.
There's also the issue of how different databases and drivers may differ
in the degree to which they can support it.

We can return to it later. For now I'm happy to just document it as a
boolean and that only 0 and 1 should be used.

Tim.