Grokbase
Topics Posts Groups | in
x
[ help ]

Re: [CDBI] Re: Was it deleted?

View PostFlat  Thread  Threaded | < Prev
Perrin Harkins Re: [CDBI] Re: Was it deleted?
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Thu, 2006-09-21 at 13:21 -0700, Bill Moseley wrote:
> Yes, that's what I meant. I'm using transactions but to catch that
> you have to use serializable transactions and re-read the objects once
> inside the transaction.

If you actually want to prevent other people from deleting it, you
probably want a SELECT...FOR UPDATE or similar to get a write lock on
it.

> Of course, even if CDBI did check the row count there's the issue of
> what to do with the triggers if no rows are updated.

Yes, if you use delete triggers that's probably the most likely reason
to care about this.  Otherwise, most people won't mind if an object they
wanted to delete was deleted by someone else.

- Perrin


_______________________________________________
ClassDBI mailing list
[email protected: Cla...@lists.digitalcraftsmen.net]
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

Thread : [CDBI] Was it deleted?
1)
Bill Moseley How do I know that $foo->delete actually deletes the object in the database? my $foo =...
2)
Edward J. Sabol Bill Moseley asked: You mean the number of rows affected by the SQL delete statement, right?...
3)
Bill Moseley Yes, that's what I meant. I'm using transactions but to catch that you have to use serializable...
4)
Perrin Harkins If you actually want to prevent other people from deleting it, you probably want a SELECT...FOR...
spacer
View PostFlat  Thread  Threaded | < Prev
Home > Groups > Class::DBI > [CDBI] Was it deleted? (4 posts) > View Post