Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Protected Attributes | |
$tableStrategy | |
![]() | |
$_resources | |
$connectionName = \Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION | |
$_connections = [] | |
$_resourceModel | |
$_tables = [] | |
$_mainTable | |
$_idFieldName | |
$_isPkAutoIncrement = true | |
$_useIsObjectNew = false | |
$_mainTableFields | |
$_uniqueFields = null | |
$_serializableFields = [] | |
$transactionManager | |
$objectRelationProcessor | |
![]() | |
$serializer | |
$_logger | |
Abstract resource model. Can be used as base for indexer resources
@api
Definition at line 17 of file AbstractResource.php.
__construct | ( | \Magento\Framework\Model\ResourceModel\Db\Context | $context, |
\Magento\Framework\Indexer\Table\StrategyInterface | $tableStrategy, | ||
$connectionName = null |
|||
) |
Class constructor
\Magento\Framework\Model\ResourceModel\Db\Context | $context | |
\Magento\Framework\Indexer\Table\StrategyInterface | $tableStrategy | |
string | $connectionName |
Definition at line 33 of file AbstractResource.php.
|
protected |
Get DB adapter for index data processing
Definition at line 58 of file AbstractResource.php.
clearTemporaryIndexTable | ( | ) |
Clean up temporary index table
Definition at line 171 of file AbstractResource.php.
getIdxTable | ( | $table = null | ) |
Get index table name with additional suffix
string | $table |
Definition at line 69 of file AbstractResource.php.
insertFromSelect | ( | $select, | |
$destTable, | |||
array | $columns, | ||
$readToIndex = true |
|||
) |
Insert data from select statement of read adapter to destination table related with index adapter
Select | $select | |
string | $destTable | |
array | $columns | |
bool | $readToIndex | data migration direction (true - read=>index, false - index=>read) |
Definition at line 132 of file AbstractResource.php.
insertFromTable | ( | $sourceTable, | |
$destTable, | |||
$readToIndex = true |
|||
) |
Copy data from source table of read adapter to destination table of index adapter
string | $sourceTable | |
string | $destTable | |
bool | $readToIndex | data migration direction (true - read=>index, false - index=>read) |
Definition at line 107 of file AbstractResource.php.
reindexAll | ( | ) |
syncData | ( | ) |
Synchronize data between index storage and original storage
Can't use truncate because of transaction
Definition at line 82 of file AbstractResource.php.
|
protected |
Definition at line 24 of file AbstractResource.php.