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

Method getThresholdsByReport

lib/Db/ThresholdMapper.php:66–85  ·  view source on GitHub ↗

* @throws Exception */

($reportId)

Source from the content-addressed store, hash-verified

64 * @throws Exception
65 */
66 public function getThresholdsByReport($reportId)
67 {
68 $sql = $this->db->getQueryBuilder();
69 $sql->from(self::TABLE_NAME)
70 ->select('id')
71 ->addSelect('dimension')
72 ->addSelect('coloring')
73 ->selectAlias('target', 'value')
74 ->addSelect('option')
75 ->addSelect('severity')
76 ->addSelect('user_id')
77 ->addSelect('sequence')
78 ->where($sql->expr()->eq('report', $sql->createNamedParameter($reportId)))
79 ->andWhere($sql->expr()->eq('user_id', $sql->createNamedParameter($this->userId)))
80 ->orderBy('sequence', 'ASC');
81 $statement = $sql->executeQuery();
82 $result = $statement->fetchAll();
83 $statement->closeCursor();
84 return $result;
85 }
86
87 public function getReportByThreshold($id)
88 {

Callers 4

readMethod · 0.80
readRawMethod · 0.80
createCopyMethod · 0.80
exportMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected