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

Method updateSequence

lib/Db/ThresholdMapper.php:157–166  ·  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

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

Callers 1

reorderMethod · 0.80

Calls 3

setMethod · 0.80
eqMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected