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

Method deleteWithFilterSimulate

lib/Db/StorageMapper.php:272–285  ·  view source on GitHub ↗

* delete data * @param int $datasetId * @param $options * @return bool * @throws Exception */

(int $datasetId, $options)

Source from the content-addressed store, hash-verified

270 * @throws Exception
271 */
272 public function deleteWithFilterSimulate(int $datasetId, $options)
273 {
274 $sql = $this->db->getQueryBuilder();
275 $sql->from(self::TABLE_NAME)
276 ->selectAlias($sql->func()->count('*'), 'count')
277 ->where($sql->expr()->eq('dataset', $sql->createNamedParameter($datasetId)));
278
279 $this->applyFilterOptions($sql, $options);
280
281 $statement = $sql->executeQuery();
282 $result = $statement->fetch();
283 $statement->closeCursor();
284 return $result;
285 }
286
287 /**
288 * delete all data of a dataset

Callers

nothing calls this directly

Calls 4

applyFilterOptionsMethod · 0.95
countMethod · 0.80
eqMethod · 0.80
fetchMethod · 0.80

Tested by

no test coverage detected