SelectQuery_sqlite::forUpdate

public function SelectQuery_sqlite::forUpdate

public SelectQuery_sqlite::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

QueryConditionInterface The called object.

Overrides SelectQuery::forUpdate

File

includes/database/sqlite/select.inc, line 17
Select builder for SQLite embedded database engine.

Class

SelectQuery_sqlite
SQLite specific query builder for SELECT statements.

Code

public function forUpdate($set = TRUE) {
  // SQLite does not support FOR UPDATE so nothing to do.
  return $this;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!database!sqlite!select.inc/function/SelectQuery_sqlite::forUpdate/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部