ZF-39: Zend_Db_Table For Update
Description
http://framework.zend.com/developer/ticket/27
I would like to suggest allowing the fetch/find methods of Zend_Db_Table to accept a $forUpdate boolean parameter.
That is in Zend_Db_Table:
function find($val) // would become
function find($val, $forUpdate = false)
function fetchRow($where = null, $order = null) // would become
function fetchRow($where = null, $order = null, $forUpdate = false)
function fetchAll($where = null, $order = null, $count = null, $offset = null) // would become
function fetchAll($where = null, $order = null, $count = null, $offset = null, $forUpdate = false)
Note: Zend_Db_Table::find() would especially benefit from this syntax.
This would make it much easier for developpers to keep database integrity and would also make the Zend_Db_Table more widely accepted.
Comments
Posted by Gavin (gavin) on 2006-07-06T17:26:46.000+0000
There should also be support for SELECT ... LOCK IN SHARE, and the corresponding locking modes in SQLite ( http://www.sqlite.org/lockingv3.html ), and similar for the other adapters. This issue is closely related to, and overlaps with, [ZF-40], although I believe [ZF-40] should be a higher priority.
Posted by Bill Karwin (bkarwin) on 2006-11-13T15:14:33.000+0000
Changing fix version to 0.8.0.
Posted by Bill Karwin (bkarwin) on 2007-01-05T17:06:23.000+0000
Recategorize as Zend_Db_Table component.
Posted by Simon Mundy (peptolab) on 2008-02-16T21:07:50.000+0000
'FOR UPDATE' can now be passed to a Zend_Db_Table find/fetch operation by passing the Zend_Db_Table_Select query. See ZF1.5 PR1 or newer.