SelectInterface::forUpdate

public SelectInterface::forUpdate($set = TRUE)

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.

File

core/lib/Drupal/Core/Database/Query/SelectInterface.php, line 650

Class

SelectInterface
Interface definition for a Select Query object.

Namespace

Drupal\Core\Database\Query

Code

public function forUpdate($set = TRUE);
doc_Drupal
2016-10-29 09:41:41
Comments
Leave a Comment

Please login to continue.