MCPcopy Create free account
hub / github.com/Rello/analytics / updateSequence

Method updateSequence

lib/Db/ThresholdMapper.php:155–164  ·  view source on GitHub ↗

* Update the sequence of one threshold * * @param int $thresholdId * @param int $sequence * @return bool * @throws Exception */

(int $thresholdId, int $sequence)

Source from the content-addressed store, hash-verified

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}

Callers 1

reorderMethod · 0.80

Calls 2

setMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected