Set imported and modified in bulk query.

@param array $ids

@return null
545402
public function setImportedByIds($ids)
    {
        try {
            $coreResource = $this->getConnection();
            $tableName = $this->getTable(Schema::EMAIL_CATALOG_TABLE);

            $coreResource->update(
                $tableName,
                [
                    'modified' => new \Zend_Db_Expr('null'),
                    'imported' => '1',
                    'updated_at' => gmdate('Y-m-d H:i:s'),
                ],
                ["product_id IN (?)" => $ids]
            );
        } catch (\Exception $e) {
            $this->helper->debug((string)$e, []);
        }
    }
1038849
public function importJournals($ids)
    {
        $journalsSql = 'SELECT journal_id, path FROM journals WHERE journal_id IN (?)';
        $journalsStatement = $this->dbalConnection->executeQuery($journalsSql, array($ids), array(Connection::PARAM_INT_ARRAY));
        $journals = $journalsStatement->fetchAll();

        foreach ($journals as $journal) {
            $existingJournal = $this->em
                ->getRepository('VipaJournalBundle:Journal')
                ->findOneBy(['slug' => $journal['path']]);

            if (!$existingJournal) {
                try {
                    $journalImporter = new JournalImporter(
                        $this->dbalConnection, $this->em, $this->logger, $this->consoleOutput, $this->ui
                    );
                    
                    $ids = $journalImporter->importJournal($journal['journal_id']);
                    $journalUserImporter = new JournalUserImporter($this->dbalConnection, $this->em, $this->logger, $this->consoleOutput);
                    $journalUserImporter->importJournalUsers($ids['new'], $ids['old'], $this->ui);
                } catch (Exception $exception) {
                    $message = sprintf(
                        '%s: %s (uncaught exception) at %s line %s',
                        get_class($exception),
                        $exception->getMessage(),
                        $exception->getFile(),
                        $exception->getLine()
                    );

                    $this->consoleOutput->writeln('Importing of journal #' . $journal['journal_id'] . ' failed.');
                    $this->consoleOutput->writeln($message);
                    $this->consoleOutput->writeln($exception->getTraceAsString());
                }
            } else {
                $this->consoleOutput->writeln('Journal #' . $journal['journal_id'] . ' already imported. Skipped.');
            }
        }
    }
1254431
public function autoExport(array $ids)
    {
        $this->exportPosts = array_replace($this->exportPosts, $ids);
        $this->exportPosts = array_unique($this->exportPosts);
    }
338998
public function setList(array $ids)
    {
        $this->ids = $ids;
        $this->count = count($ids);
        return $this;
    }
1005129
public function in($id, array $ids)
    {
        $url = $this->buildUrlByMethodName(
            'getInUrl',
            [
                'id' => $id,
                'ids' => implode(',', $ids),
            ]
        );

        $response = $this->resolveApiUrl($url);

        return $response['result'];
    }
1226335
public function newQueryForRestoration($ids)
    {
        return is_array($ids)
                ? $this->newQueryWithoutScopes()->whereIn($this->getQualifiedKeyName(), $ids)
                : $this->newQueryWithoutScopes()->whereKey($ids);
    }
411733
public function several(array $ids)
    {
        $results = [];

        foreach ($ids as $cacheId) {
            if ($this->cache->test($cacheId)) {
                $results[$cacheId] = $this->cache->load($cacheId);
            }

        }

        return $results;
    }
401490
public function getByIds(array $ids)
    {
        if (empty($ids)) {
            return null;
        }

        $parameters = array(
            'api_action' => 'list_list',
            'ids' => implode(',', $ids)
        );

        $response = $this->request($parameters);

        if ($response === null || $response->getStatusCode() !== 200) {
            return null;
        }

        $json = $response->getBody()->getContents();

        return $this->serializer->deserialize(
            $this->removeResultInformation($json),
            'array<integer, ' . \FondOfPHP\ActiveCampaign\DataTransferObject\MailingList::class . '>',
            'json'
        );
    }
88625
public function filterByIds($ids)
    {
        $this->getInstance()->andWhere($this->mainAlias.'.id IN (:ids)')->setParameter('ids', $ids);

        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;
    }
82233
protected function doFetch(array $ids)
    {
        if ( ! $ids) {
            return [];
        }

        return $this->redis->hmget($this->namespace, $this->keys($ids));
    }
8766
public function setQueries($queries)
    {
        $this->queries = [];
        if (!is_array($queries)) {
            $queries = [$queries];
        }
        foreach ($queries as $query) {
            $this->addQuery($query);
        }

        return $this;
    }
516624
protected function _clearCache( array $ids )
	{
		$domain = str_replace( '_', '/', strtolower( $this->_name ) );
		$tags = array( $domain );

		foreach( $ids as $id ) {
			$tags[] = $domain . '-' . $id;
		}

		$this->_context->getCache()->deleteByTags( $tags );
	}
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);
    }
1280172
public function setModel($model, $ids = [])
    {
        $this->model = $model;
        $this->ids = Arr::wrap($ids);

        $this->message = "No query results for model [{$model}]";

        if (count($this->ids) > 0) {
            $this->message .= ' '.implode(', ', $this->ids);
        } else {
            $this->message .= '.';
        }

        return $this;
    }
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;
	}
589236
public static function scopesFor(array $ids)
    {
        return collect($ids)->map(function ($id) {
            if (isset(static::$scopes[$id])) {
                return new Scope($id, static::$scopes[$id]);
            }

            return;
        })->filter()->values()->all();
    }