[dev] Fwd: Re: Horde Lock
duck
duck at obala.net
Fri May 16 16:11:47 UTC 2008
On Wed, 2008-05-14 at 17:35 -0400, Ben Klang wrote:
> It all seems reasonable to me. I'll look at implementing the
> addition of lock scope.
>
> /BAK/
Maybe an function like Horde_Lock::isLocked($principal, $scope, $type,
$ignore_current) will be useful to. Instead of a selecting all rows with
getLocks() we just COUNT or better select “1” with limit on “0,1” to see
if the requested resource is locked or not. And an option to ignore
locks from current user must be added to. Who cares if the resource is
locked by ourselfs.
And I will add an option to clear a lock by attributes too, again to
avoid not needed additional queries and simpler implementation.
PS. Index on columns for used in where are missing in the sql script.
More information about the dev
mailing list