Issues

ZF-39: Zend_Db_Table For Update

Issue Type: Improvement Created: 2006-06-19T23:10:05.000+0000 Last Updated: 2008-07-15T13:05:37.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Zend Framework (zend_framework) Assignee: Simon Mundy (peptolab) Tags: - Zend_Db_Table

Related issues: - ZF-3653

Attachments:

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:

<pre class="highlight">
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.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts