View Issue Details

IDProjectCategoryView StatusLast Update
422PHPOF2Defaultpublic25 Mar 2013 23:06
Reporteriarmeanu Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status confirmedResolutionopen 
Product Version0.12.3 
Summary422: There is no support for 'locked selects'
DescriptionWhen using PHPOF2 code inside a transaction, there is no support for

'SELECT ... FOR UPDATE' and
'SELECT ... LOCK IN SHARE MODE'

( to be able to lock the record for read/writes while inside a transaction ).

I would propose two different methods that might implement this functionality ( based on what driver is used and what transaction isolation level is set ):

public static function getForUpdate()
public static function getUniqueForUpdate()

Or a second parameter in the signature for get() and getUnique() that triggers this behaviour.
TagsNo tags attached.

Activities

timj

25 Mar 2013 23:06

manager   ~468

Reasonable suggestion. Don't want to go too far with adding specific functionality to get() etc. but the cleanest way to me would seem to be to add params.

e.g.
public function get($prikey_value = NULL, $options = NULL)

where $options can include:

transaction_read_lock:
 SHARED_MODE
 FOR_UPDATE

or something similar

Issue History

Date Modified Username Field Change
25 Mar 2013 13:50 iarmeanu New Issue
25 Mar 2013 23:06 timj Note Added: 468
25 Mar 2013 23:06 timj Status new => confirmed
25 Mar 2013 23:06 timj Product Version => 0.12.3