Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
eventofflinequery.php
1<?php
2namespace Bitrix\Rest;
3
4
5use Bitrix\Main\Entity\Query;
6
8{
9 public function getMarkQuery($processId)
10 {
11 // initialize all internal guts
12 $this->getQuery();
13
14 $connection = $this->entity->getConnection();
15 $helper = $connection->getSqlHelper();
16
17 $sqlWhere = $this->buildWhere();
18 $sqlOrder = $this->buildOrder();
19
20
21 $update = $helper->prepareUpdate($this->entity->getDBTableName(), array('PROCESS_ID' => $processId));
22
23 $queryParts = array_filter(array(
24 'UPDATE' => $this->quoteTableSource($this->entity->getDBTableName()).' '.$helper->quote($this->getInitAlias()),
25 'SET' => $update[0],
26 'WHERE' => $sqlWhere,
27 'ORDER BY' => $sqlOrder,
28 'LIMIT' => $this->getLimit(), // we cannot use getTopSql here
29 ));
30
31 foreach ($queryParts as $k => &$v)
32 {
33 $v = $k . ' ' . $v;
34 }
35
36 $sql = join("\n", $queryParts);
37
38 return $sql;
39 }
40}
getQuery($forceObjectPrimary=false)
Definition query.php:3838