Updates the mapping.

@param array $ids  Array of sequence -> UID mapping.

@return boolean  True if the mapping changed.
437573
public function update($ids)
    {
        if (empty($ids)) {
            return false;
        } elseif (empty($this->_ids)) {
            $this->_ids = $ids;
            $change = true;
        } else {
            $change = false;
            foreach ($ids as $k => $v) {
                if (!isset($this->_ids[$k]) || ($this->_ids[$k] != $v)) {
                    $this->_ids[$k] = $v;
                    $change = true;
                }
            }
        }

        if ($change) {
            $this->_sorted = false;
        }

        return $change;
    }
1087920
protected function deleteFromDB($ids=null)
    {

        $query = "DELETE FROM {$this->quotedTable}";

        if ($ids == null) {
            $this->connection->write($query, [], false);
            return;
        }

        $query .= " WHERE {$this->quotedIdKey} IN ";

        $quotedIds = array_map(function ($id) {
            return $this->dialect->quote($id, 'string');
        },(array)$ids);

        $this->connection->write($query . "\n(" . implode(',', $quotedIds) . ')', [], false);

    }
162589
public function batchDelete($ids) {
        $requests = [];

        foreach ($ids as $id) {
            $requests[] = [
                'method' => 'monitoring.livestatus.delete',
                'params' => [
                    'id' => $id
                ]
            ];
        }

        $result = $this->api->batchRequest($requests);

        foreach ($result as $tag) {
            // Do not check 'id' because in a batch request it is always NULL:
            if (!array_key_exists('success', $tag) ||
                $tag['success'] !== true) {
                if (array_key_exists('message', $tag)) {
                    throw new RuntimeException(sprintf('Bad result: %s', $tag['message']));
                } else {
                    throw new RuntimeException('Bad result');
                }
            }
        }

        return $this;
    }
245840
public function setIds(array $ids): void
    {
        if (empty($ids)) {
            throw new \InvalidArgumentException('At least one ID must be specified');
        }

        foreach ($ids as $id) {
            if (!\is_int($id)) {
                throw new \InvalidArgumentException('All IDs must be integers');
            }
        }

        $this->ids = $ids;
    }
918793
public function removeMany(array $ids) {
		$result = true;
		
		foreach ($ids as $id) {
			if (! apc_delete($id)) {
				$result = false;
			}
		}
		
		return $result;
	}
1073834
public function sync(array $ids, $detaching = true)
	{
		// First we need to attach any of the associated models that are not currently
		// in this joining table. We'll spin through the given IDs, checking to see
		// if they exist in the array of current ones, and if not we will insert.
		$current = $this->newPivotQuery()->lists($this->otherKey);

		$records = $this->formatSyncList($ids);

		$detach = array_diff($current, array_keys($records));

		// Next, we will take the differences of the currents and given IDs and detach
		// all of the entities that exist in the "current" array but are not in the
		// the array of the IDs given to the method which will complete the sync.
		if ($detaching && count($detach) > 0)
		{
			$this->detach($detach);
		}

		// Now we are finally ready to attach the new records. Note that we'll disable
		// touching until after the entire operation is complete so we don't fire a
		// ton of touch operations until we are totally done syncing the records.
		$this->attachNew($records, $current, false);

		$this->touchIfTouching();
	}
173245
public function itemsDelete($ids) {
		$db = BFactory::getDBO();
		if (empty($db)) {
			return false;
		}
		$qr = 'DELETE FROM `' . $this->tableName . '` WHERE (`' . $this->primaryKeyName . '` in (' . implode(',', $ids) . '))';
		$q = $db->Query($qr);
		if (empty($q)) {
			return false;
		}
		//TODO delete cache
		return true;
	}
517441
public function updateById($id, array $values) : int
    {
        $sql = 'UPDATE `' . $this->table . '` SET ';

        foreach ($values as $key => $value) {
            $sql .= $key . '=:' . $key . ', ';
        }

        $sql = substr($sql, 0, -2);
        $sql .= ' WHERE ';

        // Assign id(s)
        if (is_array($id)) {
            $i = 0;
            foreach ($id as $_id) {
                if ($i === 0) {
                    $sql .= ' id=:id' . $i;
                } else {
                    $sql .= ' OR id=:id' . $i;
                }
                $i++;
            }
            $query = $this->pdo->prepare($sql);
            for ($j = 0; $j < 0; $j++) {
                $query->bindParam(':id' . $j, $id[$j]);
            }
        } else {
            $sql .= 'id=:id';
            $query = $this->pdo->prepare($sql);
            $query->bindParam(':id', $id);
        }

        // Assign values
        foreach ($values as $key => &$value) {
            $query->bindParam(':' . $key, $value);
        }

        $query->execute();

        return $query->rowCount();
    }
542266
public function setState($state=0, $ids=array())
	{
		if (count($ids) <= 0)
		{
			return false;
		}

		$ids = array_map('intval', $ids);

		return $this->update()
			->set(array('state' => $state))
			->whereIn('id', $ids)
			->execute();
	}
841468
public function findByIds($ids)
    {
        if (!is_array($ids)) {
            $ids = explode(',', $ids);
        }

        return $this->createQueryBuilder('ml')
            ->andWhere('ml.id IN (:ids)')
            ->setParameter('ids', $ids)
            ->getQuery()
            ->getResult();
    }
1269976
public function execute($ids)
    {
        $storeIds = array_keys($this->storeManager->getStores());

        foreach ($storeIds as $storeId) {
            $dimension = $this->dimensionFactory->create(['name' => 'scope', 'value' => $storeId]);
            $this->indexerHandler->deleteIndex([$dimension], new \ArrayObject($ids));
            $this->indexerHandler->saveIndex([$dimension], $this->fullAction->rebuildStoreIndex($storeId, $ids));
        }
    }
817476
public function update($id, array $values, $idCol)
    {
        return (bool) $this->getSelection()
            ->where('?name = ?', $idCol, $id)
            ->update($values);
    }
271722
public function removeEntities(array $ids)
    {

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

        $this->entityManager->flush();
        return true;
    }
392868
public function _setImported($ids)
    {
        $nowDate = $this->coreDate->gmtDate();
        $this->reviewResourceFactory->create()
            ->setImported($ids, $nowDate);
    }
1086359
public function deleteRoles(array $ids): void
	{
		if ($this->isAjax()) {
			$roles = $this->orm->aclRoles->findById($ids);
			foreach ($roles as $role) {
				$this->orm->aclRoles->remove($role);
			}
			$this->orm->flush();
			$this['permissionsList']->reload();
		} else {
			$this->terminate();
		}
	}
268563
public function deleteByIds($ids)
    {
        $qb = $this->createQueryBuilder('filter')->delete()->where(
            'filter.id IN (:ids)'
        )->setParameter('ids', $ids);
        $qb->getQuery()->execute();
    }
976758
public function updateById($id, array $inputs)
    {
        $inputs = $this->purifyInputs($inputs);

        $model = $this->model->findOrFail($id);

        return $model->update($inputs);
    }