* Update the sequence of one threshold * * @param int $thresholdId * @param int $sequence * @return bool * @throws Exception */
(int $thresholdId, int $sequence)
| 153 | * @throws Exception |
| 154 | */ |
| 155 | public function updateSequence(int $thresholdId, int $sequence) |
| 156 | { |
| 157 | $sql = $this->db->getQueryBuilder(); |
| 158 | $sql->update(self::TABLE_NAME) |
| 159 | ->set('sequence', $sql->createNamedParameter($sequence)) |
| 160 | ->where($sql->expr()->eq('id', $sql->createNamedParameter($thresholdId))) |
| 161 | ->andWhere($sql->expr()->eq('user_id', $sql->createNamedParameter($this->userId))); |
| 162 | $sql->executeStatement(); |
| 163 | return true; |
| 164 | } |
| 165 | } |