public function SelectInterface::forUpdate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Database/Query/SelectInterface.php \Drupal\Core\Database\Query\SelectInterface::forUpdate()
Add FOR UPDATE to the query.
FOR UPDATE prevents the rows retrieved by the SELECT statement from being modified or deleted by other transactions until the current transaction ends. Other transactions that attempt UPDATE, DELETE, or SELECT FOR UPDATE of these rows will be blocked until the current transaction ends.
Parameters
$set: IF TRUE, FOR UPDATE will be added to the query, if FALSE then it won't.
Return value
\Drupal\Core\Database\Query\ConditionInterface The called object.
2 methods override SelectInterface::forUpdate()
- Select::forUpdate in core/
lib/ Drupal/ Core/ Database/ Query/ Select.php - Add FOR UPDATE to the query.
- SelectExtender::forUpdate in core/
lib/ Drupal/ Core/ Database/ Query/ SelectExtender.php - Add FOR UPDATE to the query.
File
- core/
lib/ Drupal/ Core/ Database/ Query/ SelectInterface.php, line 649 - Contains \Drupal\Core\Database\Query\SelectInterface.
Class
- SelectInterface
- Interface definition for a Select Query object.
Namespace
Drupal\Core\Database\QueryCode
public function forUpdate($set = TRUE);