View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
422 | PHPOF2 | Default | public | 25 Mar 2013 13:50 | 25 Mar 2013 23:06 |
Reporter | iarmeanu | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 0.12.3 | ||||
Summary | 422: There is no support for 'locked selects' | ||||
Description | When 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. | ||||
Tags | No tags attached. | ||||
|
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 |