|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (\Magento\Framework\App\ResourceConnection $resourceConnection, $insertIntoTable, $batchSize) | |
| insert (array $dataToInsert) | |
| flush () | |
Encapsulate logic that performs batch insert into table
Definition at line 12 of file BatchInsert.php.
| __construct | ( | \Magento\Framework\App\ResourceConnection | $resourceConnection, |
| $insertIntoTable, | |||
| $batchSize | |||
| ) |
| \Magento\Framework\App\ResourceConnection | $resourceConnection | |
| string | $insertIntoTable | |
| int | $batchSize |
Definition at line 49 of file BatchInsert.php.
| flush | ( | ) |
Insert all data form $dataStorage to DB and clear $dataStorage
Definition at line 82 of file BatchInsert.php.
| insert | ( | array | $dataToInsert | ) |
Save data to $dataStorage and automatically flush it to DB when storage size becomes equal to $batchSize
| array | $dataToInsert |
Definition at line 67 of file BatchInsert.php.