[jifty-devel] Jifty-DBI: patch proposal for a delete method for the Collection class

Frederic BLANC jifty-ml at blaf.org
Fri Oct 20 09:07:09 EDT 2006


On Thu, Oct 19, 2006 at 09:09:56PM -0400, Jesse Vincent wrote:
> 
> > > Would you be happy with a solution that called the records' delete
> > > methods instead?  That has the added benefit of catching model-specific
> > > delete code too :)
> > 
> >  Unfortunately no :( because for the application I'm writting, I really need
> > to be able to delete groups of records in one delete.
> > 
> 
> Can you talk about why you have that requirement?

 The application I'm writing is actually a framework that will be used
to write various agents which are going to work on a database to
produce/modify/delete data.  Some of them (the "External" agents) will
be driven by human operators and be written using Jifty, whereas others
(the "Internal" agents, mainly written using the database's SQL dialect)
will be driven by the events generated by the agents' activity on
the database (and triggers put on the tables.)

 Some of the agents will have to grant/revoke users' accesses to various
ressources, based on the users' profile (team membership, position,...),
and most of this job will be done by the Internal agents using regular
SQL statements, but from time to time, operators will have to revoke
user's accesses to a bunch of ressources, revocation done by deleting
the corresponding entries in the table that stores users' accesses to
the ressources.
 Because other agents may then be in charge to propagate those deletions
to other systems, if the deletions made by the operator are not atomic,
there may be cases where the user will be removed her accesses for
a ressource on some systems but kept them on others during a not so
short time period.

 If granting accesses to the same ressource on various system may spread
on a (relatively) long period, it is very important (IMO) that their
revocation be as quick (and atomic) as possible.

 regards,
 -F.

PS: I withdraw my demand to have a delete method at the JDBI::Collection
    level: parallel to this message writting, I had dig around the code
    in order to find out how to get a WHERE clause whose columns are not
    qualified.  Unfortunately that would oblige to modify too much code,
    and I think I have a workaround that will fit at my application level.
    Sorry for the buzz.


More information about the jifty-devel mailing list