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

Method deleteWithFilterSimulate

lib/Db/StorageMapper.php:259–272  ·  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

257 * @throws Exception
258 */
259 public function deleteWithFilterSimulate(int $datasetId, $options)
260 {
261 $sql = $this->db->getQueryBuilder();
262 $sql->from(self::TABLE_NAME)
263 ->selectAlias($sql->func()->count('*'), 'count')
264 ->where($sql->expr()->eq('dataset', $sql->createNamedParameter($datasetId)));
265
266 $this->applyFilterOptions($sql, $options);
267
268 $statement = $sql->executeQuery();
269 $result = $statement->fetch();
270 $statement->closeCursor();
271 return $result;
272 }
273
274 /**
275 * delete all data of a dataset

Callers

nothing calls this directly

Calls 1

applyFilterOptionsMethod · 0.95

Tested by

no test coverage detected