/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Indexer/BatchProviderInterface.php
44 строки
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2017 Adobe * All Rights Reserved. */ namespace Magento\Framework\Indexer; use Magento\Framework\DB\Adapter\AdapterInterface; use Magento\Framework\DB\Select; /** * Generator of consecutive entity ID ranges that must be handled as a batch. * * Can be used during indexation process to split large amount of data into batches * and process them one by one in order to reduce memory consumption and improve overall performance. * * @api retrieve Batches when implementing custom Indexer\Action * @since 101.0.0 */ interface BatchProviderInterface { /** * Retrieve batches (entity ID ranges) from the given table. * * @param AdapterInterface $adapter database adapter. * @param string $tableName target table name. * @param string $linkField field that is used as a record identifier. * @param int $batchSize size of the single range. * @return \Generator generator that produces entity ID ranges in the format of ['from' => ..., 'to' => ...] * @since 101.0.0 */ public function getBatches(AdapterInterface $adapter, $tableName, $linkField, $batchSize); /** * Get list of entity ids based on batch * * @param AdapterInterface $connection * @param Select $select * @param array $batch * @return array * @since 101.0.0 */ public function getBatchIds(AdapterInterface $connection, Select $select, array $batch); }