| @@ 95-102 (lines=8) @@ | ||
| 92 | * @param $actionId |
|
| 93 | * @return \Doctrine\DBAL\Query\QueryBuilder |
|
| 94 | */ |
|
| 95 | protected function getUpdateQuery($actionState, $actionId) |
|
| 96 | { |
|
| 97 | return $this->getQueryBuilder() |
|
| 98 | ->update(self::TABLE_NAME) |
|
| 99 | ->set(self::COLUMN_STATE, ':state') |
|
| 100 | ->where(self::COLUMN_ID . ' = :id') |
|
| 101 | ->setParameters(['state' => $actionState, 'id' => $actionId]); |
|
| 102 | } |
|
| 103 | ||
| 104 | /** |
|
| 105 | * @param $actionState |
|
| @@ 109-118 (lines=10) @@ | ||
| 106 | * @param $actionId |
|
| 107 | * @return \Doctrine\DBAL\Query\QueryBuilder |
|
| 108 | */ |
|
| 109 | protected function getInsertQuery($actionState, $actionId) |
|
| 110 | { |
|
| 111 | return $this->getQueryBuilder() |
|
| 112 | ->insert(self::TABLE_NAME) |
|
| 113 | ->values([ |
|
| 114 | self::COLUMN_ID => ':id', |
|
| 115 | self::COLUMN_STATE => ':state' |
|
| 116 | ]) |
|
| 117 | ->setParameters(['id' => $actionId, 'state' => $actionState]); |
|
| 118 | } |
|
| 119 | ||
| 120 | /** |
|
| 121 | * @return \Doctrine\DBAL\Connection |
|