Zend Framework

Zend_Db_Table For Update

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.1.3, 0.1.4, 0.1.5, 0.2.0
  • Fix Version/s: 1.5.0
  • Component/s: Zend_Db_Table
  • Labels:
    None
  • Fix Version Priority:
    Nice to Have

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.

Issue Links

Activity

Hide
Gavin added a comment -

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.

Show
Gavin added a comment - 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.
Hide
Bill Karwin added a comment -

Changing fix version to 0.8.0.

Show
Bill Karwin added a comment - Changing fix version to 0.8.0.
Hide
Bill Karwin added a comment -

Recategorize as Zend_Db_Table component.

Show
Bill Karwin added a comment - Recategorize as Zend_Db_Table component.
Hide
Simon Mundy added a comment -

'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.

Show
Simon Mundy added a comment - '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.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
3d
Original Estimate - 3 days
Remaining:
3d
Remaining Estimate - 3 days
Logged:
Not Specified
Time Spent - Not Specified