Deletes visits by ID. This method cascades, so conversions, conversion items and visit actions for
the visits are also deleted.

@param int[] $visitIds
@return int The number of deleted visits.
494878
public function deleteVisits($visitIds)
    {
        $numDeletedVisits = 0;

        foreach ($this->logTablesProvider->getAllLogTables() as $logTable) {
            if ($logTable->getColumnToJoinOnIdVisit()) {
                $numVisits = $this->rawLogDao->deleteFromLogTable($logTable->getName(), $visitIds);
                if ($logTable->getName() === 'log_visit') {
                    $numDeletedVisits = $numVisits;
                }
            }
        }

        return $numDeletedVisits;
    }
997637
public function delete($fileIDs)
    {
        if (is_array($fileIDs)) {
            $fileIDs = implode(',', $fileIDs);
        }

        $data = [
            'file_ids' => $fileIDs
        ];

        return $this->post('files/delete', $data, \true);
    }
415930
public function delete($id = null): bool
	{
		$instance = $this->read($id);

		return $instance->delete();
	}
117572
public function deleteEvents(array $eventIds)
    {
        $connection = $this->getConnection();
        $connection->delete($this->getMainTable(), $connection->quoteInto('event_id IN(?)', $eventIds));
    }
1247260
public function visits()
    {
        if ($this->keys->id) {
            $this->redis->zrem($this->keys->visits, $this->keys->id);
            $this->redis->del($this->keys->visits . "_countries:{$this->keys->id}");
            $this->redis->del($this->keys->visits . "_referers:{$this->keys->id}");

            foreach ($this->periods as $period => $days) {
                $this->redis->zrem($this->keys->period($period), $this->keys->id);
            }

            $this->ips();
        } else {
            $this->redis->del($this->keys->visits);
            $this->redis->del($this->keys->visits . '_total');
        }

    }
120158
public function removeMany(array $ids) {
		if (! $this->connectionCheckStatus) {
			$this->addServer();
		}
		
		$client = $this->getClient();
		$ids    = array_map([$this, 'prepareId'], $ids);
		
		$result = true;
		
		foreach ($ids as $id) {
			if (! $client->delete($id)) {
				$result = false;
			}
		}
		
		return $result;
	}
1251686
protected function getBadDay($VisitorsID)
	{
		$objVisitorsBadday = \Database::getInstance()
		        ->prepare("SELECT 
                                visitors_date, 
                                visitors_visit, 
                                visitors_hit
                            FROM 
                                tl_visitors_counter
                            WHERE 
                                vid=? AND visitors_date < ?
                            ORDER BY visitors_visit ASC, visitors_hit ASC")
                ->limit(1)
                ->execute($VisitorsID, date('Y-m-d'));
		if ($objVisitorsBadday->numRows > 0) 
		{
        	$objVisitorsBadday->next();
        	$visitors_date   = $this->parseDateVisitors($GLOBALS['TL_LANGUAGE'],strtotime($objVisitorsBadday->visitors_date));
        	$visitors_visits = $this->getFormattedNumber($objVisitorsBadday->visitors_visit,0);
        	$visitors_hits   = $this->getFormattedNumber($objVisitorsBadday->visitors_hit,0);
		} 
		else 
		{
			$visitors_date   = '';
			$visitors_visits = 0;
			$visitors_hits   = 0;
		}
		return array('VisitorsBadDayDate'   => $visitors_date,
					 'VisitorsBadDayVisits' => $visitors_visits,
					 'VisitorsBadDayHits'   => $visitors_hits
					);
	}
889180
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        if ($model->deleteWithRelated()) {
            delete_seo_data($model->post_type, $model->primaryKey);
            set_flash_success_delete_content();
        } else {
            set_flash_error_delete_content();
        }

        return $this->goBack(request()->referrer);
    }
558814
public function delete($id = null)
    {
        if (!is_null($id)) {
            $this->setId($id);
        }

        return $this->getDbGateway()->delete($this->getId());
    }
1258109
public function deleteMany($ids = null)
    {
        if (is_null($ids)) {
            $parameters = [
                'performAll' => true
            ];
        } else {
            $parameters = [
                'ids' => implode(',', (array) $ids),
            ];
        }

        $response = $this->ontraport->delete(
            $this->getNamespace(), $this->toArray($parameters)
        );

        // When deleting many objects, we get a string for the data field in the response,
        // saying "Deleted". When an object does not exist, it is ignored by oap. I believe
        // its safe to assume that we can always return successfuly here. Unless we receive
        // a non 200 status code in which case an InvalidRequest would be thrown.

        return true;
    }
672665
public function delete_many(array $keys) {
        $count = 0;
        foreach ($keys as $key) {
            if ($this->delete($key)) {
                $count++;
            }
        }
        return $count;
    }
974910
public static function deleteByIds($ids, array $params = [])
    {
        if (!is_array($ids)) {
            $ids = explode(",", $ids);
        }

        $m = new static;
        $pk = $m->getPrimaryKey();
        $records = [];
        foreach ($ids as $id) {
            $records[] = [$pk => $id];
        }

        return static::bulkDelete($records, $params);
    }
1272930
def delete_by_ids(self, ids):
        
        ids = utils.coerce_to_list(ids)
        uri = "/%s?ids=%s" % (self.uri_base, ",".join(ids))
        return self.api.method_delete(uri)
271722
public function removeEntities(array $ids)
    {

        foreach ($this->getRepository()->getEntitiesById($ids) as $entity) {
            $this->entityManager->remove($entity);
        }

        $this->entityManager->flush();
        return true;
    }
401745
public function deleteForce(array $userIds): array
    {
        $deleted = [];

        $users = $this->makeQuery()->withTrashed()->whereIn('id', $userIds)->get();

        /** @var HCUser $user */
        foreach ($users as $user) {
            if ($user->forceDelete()) {
                $deleted[] = $user;
            }
        }

        return $deleted;
    }
520145
public function delete($id): ?int
  {
    return $this->db->delete($this->class_cfg['table'], [$this->fields['id'] => $id]);
  }
7342
protected function removeIds(array $itemIds): void
    {
        $queryBuilder = $this->entityManager->createQueryBuilder();
        $queryBuilder->delete(Item::class, 'i')
                     ->andWhere('i.id IN (:itemIds)')
                     ->setParameter('itemIds', array_values($itemIds));

        $queryBuilder->getQuery()->execute();
    }