Re: Two actions in one ZSQL method = one transaction?
Andreas Jung <[email protected]> Thu, 14 Jun 2007 06:54:26 +0200
| Newsgroups | gmane.comp.web.zope.database |
|---|---|
| Message-ID | <[email protected]> |
--On 13. Juni 2007 21:11:08 -0400 Ken Winter <[email protected]> wrote: > I have a question (stated in three different ways) about the following > ZSQL method: > > 1. Will it *always* return the person_id of the person that it just > inserted? You have to answer this question your self. It depends on your database, your isolation level and your database adapter > 2. Will it do this even if another user inserted another person just in > between the two SQL actions in this ZSQL method? see above. > 3. In other words: Does a ZSQL method initiate a database transaction, so > that no other user can inset another record between the two actions in > this ZSQL method? > This is a completely different question. *If* you database provides transaction support and *if* your DA integrates with the transaction of Zope *then* everything happening within one Zope request will happen within one Zope transaction and therefore within one DB transaction. This isn't necessarily true to databases like MySQL. -aj _______________________________________________ Zope-DB mailing list [email protected] http://mail.zope.org/mailman/listinfo/zope-db
signature.asc
(application/pgp-signature, 186 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFGcMoCCJIWIbr9KYwRArOxAKCj/iAUlVi/6c6mApDO0L2rCxT7rwCeNX46 reL6xDeXhuDL/ciVf+f8y30= =nRMf -----END PGP SIGNATURE-----