Add an ids query.

@param array | string $ids

@return $this
514469
public function ids($ids)
    {
        $ids = is_array($ids) ? $ids : [$ids];

        $query = new IdsQuery($ids);

        $this->append($query);

        return $this;
    }
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));
        }
    }
1296903
protected function addFavorites( array $ids )
	{
		$context = $this->getContext();

		/** client/html/account/favorite/standard/maxitems
		 * Maximum number of products that can be favorites
		 *
		 * This option limits the number of products users can add to their
		 * favorite list. It must be a positive integer value greater than 0.
		 *
		 * @param integer Number of products
		 * @since 2019.04
		 * @category User
		 * @category Developer
		 */
		$max = $context->getConfig()->get( 'client/html/account/favorite/standard/maxitems', 100 );

		$cntl = \Aimeos\Controller\Frontend::create( $context, 'customer' );
		$item = $cntl->uses( ['product' => ['favorite']] )->get();

		if( count( $item->getRefItems( 'product', null, 'favorite' ) ) + count( $ids ) > $max )
		{
			$msg = sprintf( $context->getI18n()->dt( 'client', 'You can only save up to %1$s products as favorites' ), $max );
			throw new \Aimeos\Client\Html\Exception( $msg );
		}

		foreach( $ids as $id )
		{
			if( ( $listItem = $item->getListItem( 'product', 'favorite', $id ) ) === null ) {
				$listItem = $cntl->createListItem();
			}
			$cntl->addListItem( 'product', $listItem->setType( 'favorite' )->setRefId( $id ) );
		}

		$cntl->store();
	}
338998
public function setList(array $ids)
    {
        $this->ids = $ids;
        $this->count = count($ids);
        return $this;
    }
1340129
public function setQueryKeys(array $keys)
    {
        $this->queryKeys = [];

        foreach ($keys as $key) {
            if (is_string($key)) {
                $this->addQueryKey($key);
            }
        }

        return $this;
    }
88625
public function filterByIds($ids)
    {
        $this->getInstance()->andWhere($this->mainAlias.'.id IN (:ids)')->setParameter('ids', $ids);

        return $this;
    }
268563
public function deleteByIds($ids)
    {
        $qb = $this->createQueryBuilder('filter')->delete()->where(
            'filter.id IN (:ids)'
        )->setParameter('ids', $ids);
        $qb->getQuery()->execute();
    }
899099
public function byIds(array $ids, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

  	return $this->Account->setConnection($databaseConnectionName)
      ->whereIn('id',$ids)
      ->get();
  }
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;
	}
1097578
public function presences($ids) {
        if(is_array($ids)) $ids =  implode(",", $ids);
		$data = $this->reqdata();
        $data['ids'] = $ids;
        return $this->request('presences', $data);
    }
620457
public function queryMessageStatus(array $ids)
    {
        $request = $this->client->newRequest(
            'GET',
            $this->client->buildUriWithQuery('/SmQueryGet.asp', ['msgid' => implode(',', $ids)])
        );

        $response = $this->client->sendRequest($request);

        return $this->parseMessageStatusResponse($response);
    }
87036
public function tag($ids, $tags)
    {
        $namespace = $this->getNamespace() . '/tag';

        return $this->ontraport->put($namespace, $this->toArray([
            'ids' => implode(',', (array) $ids),
            'add_list' => implode(',', (array) $tags),
        ]));
    }
648272
public function setModified($ids)
    {
        $write     = $this->getConnection();
        $tableName = $this->getTable(Schema::EMAIL_CATALOG_TABLE);
        $write->update(
            $tableName,
            ['modified' => 1],
            [
                $write->quoteInto("product_id IN (?)", $ids),
                $write->quoteInto("imported = ?", 1)
            ]
        );
    }
75547
public function setIds(array $ids)
    {
        $actualIds = [];

        foreach ($ids as $id) {
            $this->assertValidId($id);
            $actualIds[] = $id;
        }

        $this->clearCachedValueIf($this->ids != $actualIds);
        $this->ids = $actualIds;
    }
253006
public final function setIds(array $ids): void
    {
        foreach ($ids as $id) {
            $this->ids[] = (int) $id;
        }
    }
731228
public function id($ids){
        $ids = (array)$ids;
        if (count($ids) !== count($this->config['pkeys']))
            throw new Exception('Unmatched id count ' . count($ids)
                                . ':' . count($this->config['pkeys']));
        $pkeys = $this->config['pkeys'];
        foreach ($pkeys as $i => $pkey)
            $this->where->eq(array($this->voName . '.' . Util::toVoName($pkey) =>$ids[$i]));

        return $this;
    }
533286
public Map<String, Set<String>> queriesForIds(Collection<String> ids) {
        Set<String> idsWithParents = getIdsForIdsWithAncestors(ids);
        Map<String, Set<String>> queries = new HashMap<String, Set<String>>();
        for (String id : idsWithParents) {
            queries.put(id, getIdsForIdWithDescendants(id));
        }
        return queries;
    }